0.8.5 #17
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 | |
on: | |
workflow_dispatch: ~ | |
push: | |
branches: | |
- main | |
tags: | |
- v[0-9]* | |
release: | |
types: | |
- created | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
# Limit the permissions of the github token so that the script don't | |
# accidently do more than it should | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
# Setup | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '22' | |
- run: npm ci | |
# Publish to NPM | |
- uses: actions/setup-node@v2 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Publish to GitHub | |
- uses: actions/setup-node@v2 | |
with: | |
registry-url: 'https://npm.pkg.github.com' | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |