Skip to content

Commit 44099c4

Browse files
kevinypfanclaude
andcommitted
ci: publish prerelease tags to the npm next dist-tag
Tags containing a hyphen (e.g. v1.5.0-rc.1) publish to `next` so release candidates are not installed by default; final tags (v1.5.0) stay on `latest`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 088d569 commit 44099c4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎.github/workflows/publish.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ jobs:
3434
run: yarn test:cov
3535

3636
- name: Publish to NPM
37-
run: npm publish --provenance --access public
37+
# Prerelease tags (e.g. v1.5.0-rc.1) go to the `next` dist-tag so they
38+
# are not installed by default; final tags (v1.5.0) go to `latest`.
39+
run: |
40+
if [[ "${GITHUB_REF_NAME}" == *-* ]]; then
41+
npm publish --provenance --access public --tag next
42+
else
43+
npm publish --provenance --access public
44+
fi
3845
env:
3946
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)