Skip to content

Commit 94eb549

Browse files
committed
Merge branch 'ci/cd-workflow'
2 parents a2cc667 + e68a1c1 commit 94eb549

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/cd.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deliver
2+
# privileged workflow that is restricted to master & next
3+
# in order to correspond to @latest and @next
4+
5+
on:
6+
workflow_run:
7+
workflows: [ Branch Update ]
8+
types: [ completed ]
9+
branches: [ master, next ]
10+
11+
jobs:
12+
13+
release:
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: git checkout HEAD
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version-file: '.nvmrc'
25+
26+
- name: Install dependencies
27+
run: npm install --prefer-offline --no-fund --no-audit
28+
29+
- name: Clean package.json
30+
run: |
31+
npm pkg delete scripts
32+
npm pkg delete devDependencies
33+
npm pkg delete config
34+
35+
- name: Run semantic-release
36+
run: npx semantic-release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)