Skip to content

chore: enable npm trusted publishing#271

Merged
Zeryther merged 2 commits into
mainfrom
feature/oidc-npm-publish
Feb 25, 2026
Merged

chore: enable npm trusted publishing#271
Zeryther merged 2 commits into
mainfrom
feature/oidc-npm-publish

Conversation

@Zeryther

@Zeryther Zeryther commented Feb 25, 2026

Copy link
Copy Markdown
Member

Summary\n- use GitHub-hosted runner for OIDC\n- set npm registry in setup action\n- upgrade npm for trusted publishing\n- publish via npm workspaces allowlist\n\n## Testing\n- pnpm format

Summary by CodeRabbit

  • Chores
    • Updated release workflow to use standard Ubuntu environment instead of self-hosted runner
    • Added configurable npm registry URL support for deployment flexibility
    • Upgraded npm to version 11.5.1 for OIDC trusted publishing capability
    • Streamlined package publishing process

@changeset-bot

changeset-bot Bot commented Feb 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5ce0e50

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Feb 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sdk-harmony Ready Ready Preview, Comment Feb 25, 2026 8:19am

Request Review

@coderabbitai

coderabbitai Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@Zeryther has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 33 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 28449b8 and 5ce0e50.

📒 Files selected for processing (1)
  • .github/actions/setup/action.yaml
📝 Walkthrough

Walkthrough

CI/CD configuration updates to support npm registry configuration, switch release workflow from self-hosted to ubuntu-latest runner, upgrade npm to version 11.5.1, and modify the publishing mechanism from pnpm recursive to npm publish with explicit workspace flags.

Changes

Cohort / File(s) Summary
GitHub Actions Configuration
.github/actions/setup/action.yaml
Added new registry-url input parameter with description "Registry URL for npm" and passed it to the setup-node action to enable configurable npm registry URL during Node setup.
Release Workflow
.github/workflows/release.yaml
Changed runner environment from self-hosted (blacksmith-4vcpu-ubuntu-2204) to ubuntu-latest, added step to configure npm registry URL to https://registry.npmjs.org, upgraded npm to version 11.5.1 for OIDC trusted publishing support, and removed NPM_TOKEN environment variable from the Changesets publishing step.
Package Publishing Script
package.json
Modified ci:publish script to use npm publish with explicit --workspace flags instead of pnpm -r, while preserving subsequent update-canary-tags and changeset tag steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰✨ A registry configured with care,
npm's trusted publishing in the air,
From pnpm's paths to npm's way,
Our releases hop brighter today! 📦🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: enable npm trusted publishing' clearly and concisely summarizes the main change: enabling OIDC-based trusted publishing for npm packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/oidc-npm-publish

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
package.json (1)

15-15: Explicit workspace allowlist will silently skip newly-added packages.

The switch from pnpm -r to an explicit --workspace list is intentional per the PR description, but any new workspace package added to the monorepo must also be manually added here or it will be skipped during releases without any error or warning.

Consider adding a comment to make the maintenance requirement explicit, or add a CI lint step that diffs workspaces glob expansion against the allowlist:

♻️ Proposed comment addition
-"ci:publish": "npm publish --workspace=@gigadrive/sdk --workspace=@gigadrive/commons --workspace=@gigadrive/network-config --workspace=@gigadrive/build-utils --workspace=@gigadrive/harmony --workspace=gigadrive && node scripts/update-canary-tags.mjs && changeset tag",
+// NOTE: When adding a new publishable package, add it as --workspace=<name> here.
+"ci:publish": "npm publish --workspace=@gigadrive/sdk --workspace=@gigadrive/commons --workspace=@gigadrive/network-config --workspace=@gigadrive/build-utils --workspace=@gigadrive/harmony --workspace=gigadrive && node scripts/update-canary-tags.mjs && changeset tag",

(JSON doesn't support comments natively — a separate scripts/ci-publish.sh would be a cleaner home for this documentation.)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 15, The ci:publish npm script now uses an explicit
--workspace allowlist (the "ci:publish" script and referenced packages like
`@gigadrive/sdk`, `@gigadrive/commons`, etc.), which will silently omit newly added
packages; update this by either (A) moving the publish logic into a dedicated
script (e.g., scripts/ci-publish.sh or scripts/ci-publish.mjs) that documents
the maintenance requirement and uses a workspaces glob or clearly lists
packages, or (B) add a CI lint step that compares the allowlist in the
"ci:publish" script against package.json workspaces (automate detection of
missing packages and fail the CI), and include a short inline README or comment
in that new script explaining that new packages must be added to the allowlist
when intentional.
.github/actions/setup/action.yaml (1)

21-24: No issue with registry-url support—migrate to upstream actions/setup-node@v20+ instead.

The useblacksmith/setup-node@v5 action fully supports the registry-url input and will correctly write the .npmrc file and configure NODE_AUTH_TOKEN authentication. However, the Blacksmith team archived this action on October 14, 2025, and recommends migrating back to the upstream actions/setup-node (which includes all the same functionality and is actively maintained). Consider updating to actions/setup-node@v4 or later.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/actions/setup/action.yaml around lines 21 - 24, Replace the archived
third-party action usage "uses: useblacksmith/setup-node@v5" with the upstream
maintained action "uses: actions/setup-node@v4" (or a later supported release),
keeping the same inputs (node-version and registry-url) so .npmrc and
NODE_AUTH_TOKEN behavior remains; update the workflow step that references
useblacksmith/setup-node@v5 to actions/setup-node@v4 and verify that the
existing inputs node-version and registry-url are passed through unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/actions/setup/action.yaml:
- Around line 21-24: Replace the archived third-party action usage "uses:
useblacksmith/setup-node@v5" with the upstream maintained action "uses:
actions/setup-node@v4" (or a later supported release), keeping the same inputs
(node-version and registry-url) so .npmrc and NODE_AUTH_TOKEN behavior remains;
update the workflow step that references useblacksmith/setup-node@v5 to
actions/setup-node@v4 and verify that the existing inputs node-version and
registry-url are passed through unchanged.

In `@package.json`:
- Line 15: The ci:publish npm script now uses an explicit --workspace allowlist
(the "ci:publish" script and referenced packages like `@gigadrive/sdk`,
`@gigadrive/commons`, etc.), which will silently omit newly added packages; update
this by either (A) moving the publish logic into a dedicated script (e.g.,
scripts/ci-publish.sh or scripts/ci-publish.mjs) that documents the maintenance
requirement and uses a workspaces glob or clearly lists packages, or (B) add a
CI lint step that compares the allowlist in the "ci:publish" script against
package.json workspaces (automate detection of missing packages and fail the
CI), and include a short inline README or comment in that new script explaining
that new packages must be added to the allowlist when intentional.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 377dddc and 28449b8.

📒 Files selected for processing (3)
  • .github/actions/setup/action.yaml
  • .github/workflows/release.yaml
  • package.json

@Zeryther
Zeryther merged commit d3eba96 into main Feb 25, 2026
13 checks passed
@Zeryther
Zeryther deleted the feature/oidc-npm-publish branch February 25, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant