Skip to content

Commit

Permalink
Update publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Apr 29, 2024
1 parent b970f11 commit dba699e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Publish to NPM

# publish only when package json has changed - assuming version upgrade
on:
workflow_dispatch:
push:
branches: [main]
paths: "lib/r18gs/package.json"
Expand Down Expand Up @@ -37,6 +38,7 @@ jobs:
run: pnpm test
- name: publish to NPM
run: pnpm build && pnpm publish-package
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -45,7 +47,7 @@ jobs:

- name: Create GitHub release
run: |
v=$(node.exe -p -e "require('./package.json').version")
v=$(node -p -e "require('./package.json').version")
gh release create $v --generate-notes --latest -F CHANGELOG.md --title "Release $v"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit dba699e

Please sign in to comment.