Skip to content

Commit

Permalink
Split publish workflow into two parts
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson authored Oct 6, 2021
1 parent 23aafe6 commit 170b622
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
types: [created]

jobs:
publish:

publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -22,9 +23,21 @@ jobs:
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 170b622

Please sign in to comment.