Skip to content

Commit 9731c9a

Browse files
authored
Identify Pre-Release Tags (#62)
Any tag with a hyphen will not be tagged as latest on npm.
1 parent 1c4a82f commit 9731c9a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ jobs:
3636
- name: Publish with npm
3737
run: |
3838
cd packages/agent-sdk
39-
npm publish --access public
39+
# If the version string includes a hyphen (e.g. 1.2.0-beta.1), mark as "next"
40+
if [[ "$GITHUB_REF" =~ - ]]; then
41+
npm publish --access public --tag next
42+
else
43+
npm publish --access public
44+
fi
4045
env:
4146
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)