Skip to content

Commit 33229a4

Browse files
Support beta releases by publishing with --tag beta (#1146)
1 parent 3485a06 commit 33229a4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ jobs:
6363

6464
- run: npm ci
6565

66-
- run: npm publish --provenance --access public
66+
- name: Determine npm tag
67+
id: npm-tag
68+
run: |
69+
VERSION=$(node -p "require('./package.json').version")
70+
if [[ "$VERSION" == *"-beta"* ]]; then
71+
echo "tag=--tag beta" >> $GITHUB_OUTPUT
72+
else
73+
echo "tag=" >> $GITHUB_OUTPUT
74+
fi
75+
76+
- run: npm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
6777
env:
6878
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)