-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 980 Bytes
/
cicd.yml
File metadata and controls
38 lines (33 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: CI/CD
on:
pull_request: { branches: ["*"] }
push:
branches:
- "+([0-9])?(.{+([0-9]),x}).x"
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo Build
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo Test
release:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 17
- run: cp .github/.releaserc.json .
- run: npm i -g semantic-release @semantic-release/changelog @semantic-release/git
- run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}