Support beta releases by publishing with --tag beta (#1146)

This commit is contained in:
Felix Weinberger 2025-11-20 21:40:34 +00:00 • committed by GitHub
commit 33229a482c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,6 +63,16 @@ jobs:
- run: npm ci
- run: npm publish --provenance --access public
- name: Determine npm tag
id: npm-tag
run: |
VERSION=$(node -p "require('./package.json').version")
if [[ "$VERSION" == *"-beta"* ]]; then
echo "tag=--tag beta" >> $GITHUB_OUTPUT
else
echo "tag=" >> $GITHUB_OUTPUT
fi
- run: npm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}