ci: add provenance to npm publish (#53) #10
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: npm | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
container: emscripten/emsdk | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Delete large LICENSE file | |
run: rm LICENSE | |
- | |
name: Restore node modules cache | |
uses: actions/cache@v4 | |
with: | |
path: ./node_modules/ | |
key: npm-${{ hashFiles('package.json') }} | |
- | |
name: Install dependencies | |
run: npm install | |
- | |
name: Build project | |
run: npm run build | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Publish project | |
run: npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |