Skip to content

Commit

Permalink
build(publish): collapse to single build
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus authored Oct 4, 2021
1 parent 791de71 commit d247c9e
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@ on:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm ci
- run: npm run build --if-present
- run: npm test
publish-npm:
needs: build
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -26,29 +15,16 @@ jobs:
registry-url: https://registry.npmjs.org/
- 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 publish
- run: npm whoami; npm publish
env:
NPM_TOKEN: ${{secrets.npm_token}}
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- 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 version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm publish
- run: npm whoami; npm publish
env:
NPM_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit d247c9e

Please sign in to comment.