Skip to content

Commit 4039656

Browse files
committed
fix: publish beta releases with --tag beta
- Check if release is marked as prerelease - Use --tag beta for prereleases to avoid overwriting latest tag
1 parent ec62694 commit 4039656

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ jobs:
3030
- name: Publish to npm
3131
env:
3232
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
33-
run: npm publish --access public || true
33+
run: |
34+
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
35+
npm publish --access public --tag beta
36+
else
37+
npm publish --access public
38+
fi

0 commit comments

Comments
 (0)