Parse dist-tag from version for publishing on NPM (#8039)

This commit is contained in:
Vladimir Agafonkin
2022-03-08 15:44:57 +02:00
committed by GitHub
parent bbbd84fa1e
commit 76b0d406d7

View File

@ -210,6 +210,8 @@ jobs:
registry-url: https://registry.npmjs.org
- name: Publish to NPM
run: npm publish
run: |
TAG=$(echo $GITHUB_REF_NAME | grep -oP '^v\d+\.\d+\.\d+-?\K(\w+)?')
npm publish --tag ${TAG:-latest}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}