v1.1.0 #2
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: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
run_install: true | |
- name: Run lint | |
run: pnpm lint | |
- name: Run tests | |
run: pnpm test | |
- name: Build | |
run: pnpm build | |
- run: npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |