Skip to content
Open
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
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Package to npmjs
on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- name: Verify tag matches version
run: |
VERSION=$(node -p "require('./package.json').version")
TAG=${GITHUB_REF_NAME#v}
if [ "$VERSION" != "$TAG" ]; then
echo "Release tag does not match version in package.json"
exit 1
fi
- run: npm ci --ignore-scripts
- run: npm publish --provenance
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

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

The npm publish step is missing the NODE_AUTH_TOKEN environment variable which is required for authentication to npmjs. Add env: NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} to this step.

Suggested change
- run: npm publish --provenance
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

@jbudz jbudz Sep 4, 2025

Choose a reason for hiding this comment

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