Skip to content

Fix npm publish step #3

Fix npm publish step

Fix npm publish step #3

Workflow file for this run

name: Publish to NPM
on:
push:
tags:
- "v*"
# Provenance requires id-token:write so npm can verify the package
# was built in this GitHub Actions workflow via Sigstore.
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix develop --command pnpm install --frozen-lockfile
- run: nix develop --command pnpm build
- run: nix develop --command pnpm test
- run: |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc
nix develop --command pnpm -r publish --no-git-checks --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true