-
Notifications
You must be signed in to change notification settings - Fork 4
chore: migrate to npm trusted publishing and GitHub App token #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||||
| name: Publish to npm | ||||||||
|
|
||||||||
| on: | ||||||||
| push: | ||||||||
| tags: | ||||||||
| - 'v[0-9]*' | ||||||||
|
|
||||||||
| jobs: | ||||||||
| publish: | ||||||||
| runs-on: ubuntu-latest | ||||||||
| permissions: | ||||||||
| id-token: write | ||||||||
| contents: read | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
|
||||||||
| with: | |
| with: | |
| node-version: '18' |
Copilot
AI
Feb 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The publish workflow is missing the build step before publishing. The package.json specifies that only the /dist directory should be published (line 14-16 in package.json), but /dist is gitignored and needs to be built from TypeScript sources using yarn prepack. Without running yarn prepack before npm publish, the package will be published without the compiled JavaScript files, causing the publish to fail or publish an incomplete package.
Add - run: yarn prepack after the - run: yarn step to compile TypeScript to the /dist directory before publishing.
| - run: yarn | |
| - run: yarn | |
| - run: yarn prepack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag trigger pattern 'v[0-9]' is too permissive and will match tags like 'v1', 'v12', etc., not just semantic version tags. Since the semantic-release configuration uses tagFormat 'v${version}' (line 2 of .releaserc.yaml) which produces tags like 'v1.2.3', consider using a more specific pattern like 'v[0-9]+.[0-9]+.[0-9]+' or 'v..' to ensure the publish workflow only triggers on valid semantic version tags.