Skip to content

Commit

Permalink
Update npm publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bencompton committed Mar 23, 2024
1 parent 46da7ae commit e92e2d2
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish to NPM

name: npm-publish
on:
push:
branches:
- master
jobs:
publish-npm:
needs: build
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm test
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.JEST_CUCUMBER_NPM_TOKEN}}
- name: Checkout repository
uses: actions/checkout@v2
- name: Publish if version has been updated
uses: pascalgn/npm-publish-action@1.3.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.JEST_CUCUMBER_NPM_TOKEN }}

0 comments on commit e92e2d2

Please sign in to comment.