Skip to content

Commit b357d63

Browse files
authored
Merge pull request #140 from github/split-publish-workflow
Split publish workflow into two parts
2 parents 23aafe6 + 170b622 commit b357d63

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
types: [created]
66

77
jobs:
8-
publish:
8+
9+
publish-npm:
910
runs-on: ubuntu-latest
1011
steps:
1112
- uses: actions/checkout@v2
@@ -22,9 +23,21 @@ jobs:
2223
- run: npm whoami; npm --ignore-scripts publish
2324
env:
2425
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
26+
27+
publish-gpr:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
2531
- uses: actions/setup-node@v2
2632
with:
33+
node-version: 14
2734
registry-url: https://npm.pkg.github.com/
35+
- run: npm ci
36+
- run: npm run build --if-present
37+
- run: npm test
38+
- run: npm version ${TAG_NAME} --git-tag-version=false
39+
env:
40+
TAG_NAME: ${{ github.event.release.tag_name }}
2841
- run: npm whoami; npm --ignore-scripts publish
2942
env:
3043
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)