fix(ci): drop --provenance (requires a public repo) #2
Workflow file for this run
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 | |
| # 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 }} |