Skip to content

Commit 07811b9

Browse files
authored
Merge pull request #57 from authorizerdev/fix/ci-safe-npm-publish
fix(ci): CI-safe npm publish on release
2 parents b15020c + fa02595 commit 07811b9

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ jobs:
2626
run: make build
2727

2828
- name: Publish to npm
29+
# Publish directly here. The Makefile publish-rc/publish targets
30+
# are interactive (confirm prompt) and re-do the commit/tag/push —
31+
# correct for a human running the whole release locally, but they
32+
# hang/cancel in CI, which fires AFTER the tag already exists.
2933
run: |
30-
if [[ "${{ github.ref }}" =~ -rc\.[0-9]+$ ]]; then
31-
make publish-rc
34+
if [[ "${GITHUB_REF_NAME}" == *-rc.* ]]; then
35+
npm publish --tag rc --access public
36+
elif [[ "${GITHUB_REF_NAME}" == *-beta.* ]]; then
37+
npm publish --tag beta --access public
3238
else
33-
make publish
39+
npm publish --access public
3440
fi
3541
env:
3642
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)