Skip to content

Commit 7af913c

Browse files
committed
ci(release): leveraged the reusable workflow
1 parent ae7c0c9 commit 7af913c

File tree

2 files changed

+25
-30
lines changed

2 files changed

+25
-30
lines changed

.github/workflows/node-ci.yml

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ name: Node.js CI
33
push:
44
branches:
55
- master
6-
- alpha
76
- beta
8-
- 'renovate/**'
7+
- renovate/**
98
pull_request:
109
types:
1110
- opened
@@ -18,49 +17,34 @@ jobs:
1817
runs-on: ubuntu-latest
1918
steps:
2019
- uses: actions/checkout@v2
21-
- name: Read .nvmrc
22-
run: 'echo ::set-output name=NVMRC::$(cat .nvmrc)'
23-
id: nvm
2420
- name: Setup node
2521
uses: actions/setup-node@v2
2622
with:
27-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
28-
- uses: bahmutov/npm-install@v1
23+
node-version-file: .nvmrc
24+
cache: npm
25+
- run: npm clean-install
2926
- run: npm test
3027
- name: Upload coverage data to Codecov
31-
run: 'npm run coverage:report'
28+
run: npm run coverage:report
3229
release:
33-
needs: verify
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v2
37-
- name: Read .nvmrc
38-
run: 'echo ::set-output name=NVMRC::$(cat .nvmrc)'
39-
id: nvm
40-
- name: Setup node
41-
uses: actions/setup-node@v2
42-
with:
43-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
44-
- uses: bahmutov/npm-install@v1
45-
- name: semantic-release
46-
run: npx semantic-release
47-
env:
48-
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
49-
NPM_TOKEN: '${{ secrets.NPM_PUBLISH_TOKEN }}'
30+
needs:
31+
- verify
32+
uses: >-
33+
form8ion/.github/.github/workflows/release-package-semantic-release-19.yml@master
34+
secrets:
35+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
5036
storybook:
5137
if: github.ref == 'refs/heads/master'
5238
needs: verify
5339
runs-on: ubuntu-latest
5440
steps:
5541
- uses: actions/checkout@v2
56-
- name: Read .nvmrc
57-
run: 'echo ::set-output name=NVMRC::$(cat .nvmrc)'
58-
id: nvm
5942
- name: Setup node
6043
uses: actions/setup-node@v2
6144
with:
62-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
63-
- uses: bahmutov/npm-install@v1
45+
node-version-file: .nvmrc
46+
cache: npm
47+
- run: npm clean-install
6448
- run: npm run build
6549
- name: Configure git user for relase to GitHub Pages
6650
run: |

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Release
2+
'on':
3+
push:
4+
branches:
5+
- alpha
6+
jobs:
7+
release:
8+
uses: >-
9+
form8ion/.github/.github/workflows/release-package-semantic-release-19.yml@master
10+
secrets:
11+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)