Skip to content

Commit

Permalink
Use npm dist-tags to publish beta builds based on the tag name.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhbw committed Nov 1, 2022
1 parent 20f594d commit 37fb122
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
node-version: 16
registry-url: "https://registry.npmjs.org"
- run: yarn install --frozen-lockfile
- 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 }}

0 comments on commit 37fb122

Please sign in to comment.