Publish #5
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: | |
release: | |
types: [published] | |
permissions: | |
packages: write | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# This sets up .npmrc to use NODE_AUTH_TOKEN below | |
# See https://github.com/actions/setup-node/blob/48b90677b6048efbc723b11a94acb950d3f1ac36/src/authutil.ts#L48 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- uses: jetli/[email protected] | |
with: | |
version: v0.13.1 | |
- name: Build | |
run: npm run build | |
- name: Publish | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |