Support beta releases by publishing with --tag beta (#1146)
This commit is contained in:
parent
3485a06f85
commit
33229a482c
1 changed files with 11 additions and 1 deletions
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue