Skip to content

fix(ci): drop --provenance (requires a public repo) #2

fix(ci): drop --provenance (requires a public repo)

fix(ci): drop --provenance (requires a public repo) #2

Workflow file for this run

name: Publish
# Auto-publish to npm when a version tag is pushed:
# git tag v0.1.0 && git push origin v0.1.0
# Requires the repo secret NPM_TOKEN (npmjs.com -> Access Tokens -> Automation).
on:
push:
tags:
- "v*"
jobs:
publish:
name: build + publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # npm provenance
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install
run: bun install
- name: Test
run: bun test
- name: Typecheck
run: bunx tsc --noEmit
- name: Build
run: bun run build
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
- name: Publish
# --provenance requires a PUBLIC repo; re-add it if/when this repo goes public.
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}