Skip to content

Commit bf54475

Browse files
author
Deepak Kumar
committed
Update publish workflow to handle beta and latest tag releases
1 parent defe041 commit bf54475

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,15 @@ jobs:
2020
node-version: '24'
2121
registry-url: 'https://registry.npmjs.org'
2222
- run: npm ci
23-
- run: npm publish
23+
24+
- name: Extract tag name
25+
id: tag
26+
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
27+
28+
- name: Publish with beta tag
29+
if: contains(steps.tag.outputs.TAG_NAME, 'beta')
30+
run: echo npm publish --tag beta
31+
32+
- name: Publish with latest tag
33+
if: "!contains(steps.tag.outputs.TAG_NAME, 'beta')"
34+
run: echo npm publish

0 commit comments

Comments
 (0)