Publish to NPM #2
This file contains hidden or 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: | ||
push: | ||
tags: ['v*'] | ||
workflow_dispatch: | ||
jobs: | ||
chrome-tests: | ||
uses: ./.github/workflows/tests.yml | ||
Check failure on line 10 in .github/workflows/publish.yml
|
||
publish: | ||
needs: [chrome-tests] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '21.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
run_install: true | ||
- name: Build | ||
run: pnpm build | ||
- name: Pack | ||
run: rm -f *.tgz && npm pack | ||
- name: Publish | ||
run: npm publish *.tgz --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |