Skip to content

Commit cb75f82

Browse files
authored
Merge branch 'main' into 950-key-on-repo-urls
2 parents 74643e6 + de10c80 commit cb75f82

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/npm.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ jobs:
2424
- run: npm run build
2525
env:
2626
IS_PUBLISHING: 'YES'
27-
- run: npm publish --access=public
27+
28+
- name: Check if pre-release and publish to NPM
29+
run: |
30+
VERSION=$(node -p "require('./package.json').version")
31+
if [[ "$VERSION" == *"-"* ]]; then
32+
echo "Publishing pre-release: $VERSION"
33+
npm publish --access=public --tag rc
34+
else
35+
echo "Publishing stable release: $VERSION"
36+
npm publish --access=public
37+
fi
2838
env:
2939
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)