Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@ name: Publish
permissions:
contents: read
packages: write
id-token: write # Required for OIDC

on:
release:
types: [created]
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., v1.2.3)'
required: true
type: string

jobs:
publish-npm:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
Expand All @@ -21,7 +28,5 @@ jobs:
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
TAG_NAME: ${{ github.event.release.tag_name || github.event.inputs.version }}
- run: npm --ignore-scripts publish
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using NPM trusted publishing with OIDC, it's recommended to add the --provenance flag to the publish command. This generates signed provenance attestations that provide verifiable information about how the package was built, enhancing supply chain security. Change this line to: npm --ignore-scripts publish --provenance

Suggested change
- run: npm --ignore-scripts publish
- run: npm --ignore-scripts publish --provenance

Copilot uses AI. Check for mistakes.