v1.1.0 #94
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to NPM | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org/ | |
- run: yarn install | |
- run: yarn test | |
- run: yarn run build | |
- run: echo ${{github.ref}} | |
- name: Release canary version | |
# The ref will be the tag name. Match against tags like | |
# "v1.0.0-canary.0". | |
if: ${{ contains(github.ref, '-canary.') }} | |
run: npm publish --tag canary | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
- name: Release latest version | |
# Assume non-canary is latest. | |
if: ${{ !contains(github.ref, '-canary.') }} | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |