-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix npm publish using trusted publishing with OIDC authentication #1
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
Conversation
Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com>
… workflow Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com>
Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com>
|
@copilot Don't use NPM token use trusted publisher https://docs.npmjs.com/trusted-publishers |
Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com>
Done! Reverted to use npm trusted publishing with OIDC authentication. The workflow now uses GitHub's OIDC tokens instead of NPM_TOKEN. Key changes in commit d1aab64:
The maintainer needs to configure the trusted publisher on npmjs.com (detailed steps in PUBLISHING.md) - no GitHub secrets required. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
Pull Request Overview
This PR adds comprehensive documentation for publishing the qlaw-cli package to npm using modern npm Trusted Publishing with GitHub Actions OIDC authentication, and updates the publish workflow to include the --access public flag.
Key Changes
- New publishing guide documenting the npm Trusted Publishing setup and workflow
- Updated GitHub Actions workflow to add
--access publicflag to the npm publish command - Added reference to the publishing guide in the README for maintainers
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/PUBLISHING.md | Comprehensive guide covering npm Trusted Publishing setup, publishing process, troubleshooting, security features, and version management |
| .github/workflows/publish.yml | Added --access public flag to npm publish command to ensure package is published as public |
| README.md | Added link to the new publishing guide in the Contributing section |
| bun.lock | Normal Bun lockfile update adding configVersion field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai>
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.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Workflow failed with
404 Not Found - 'qlaw-cli@0.1.2' is not in this registrybecause the package doesn't exist on npm yet. This PR configures the workflow to use npm Trusted Publishing with GitHub Actions OIDC authentication, eliminating the need for stored npm tokens.Type of Change
Related Issues
Fixes the npm publish failure in workflow runs
Changes Made
Workflow Configuration
--access publicflag to npm publish command--provenanceflag for supply chain securityid-token: writepermission for GitHub OIDC authenticationDocumentation
docs/PUBLISHING.mdwith trusted publishing setup guideScreenshots (if applicable)
N/A - Workflow configuration changes
Testing
Test Configuration
Test Cases
bun run typecheck)Checklist
Breaking Changes
None. Workflow uses modern OIDC authentication. Requires one-time trusted publisher configuration on npmjs.com.
Additional Notes
Repository owner must configure trusted publishing on npmjs.com:
Qredenceqlaw-clipublish.ymlreleaseFor first-time publish:
npm publish --access public), then configure trusted publishingSecurity Benefits:
Reference: https://docs.npmjs.com/trusted-publishers
Provenance attestation (
--provenance) maintained for supply chain security.Reviewer Checklist
Original prompt
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.