Skip to content

ci: add release workflow that publishes on v* tag push#22

Merged
phanan merged 2 commits into
masterfrom
add-release-workflow
May 1, 2026
Merged

ci: add release workflow that publishes on v* tag push#22
phanan merged 2 commits into
masterfrom
add-release-workflow

Conversation

@phanan

@phanan phanan commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds .github/workflows/release.yml so that pushing a v* tag triggers npm publish. Without this, tags don't go anywhere — npm doesn't watch git tags by itself.

What it does

  • Triggers on tags matching v* (e.g. v5.0.0, v5.1.0).
  • Verifies the tag matches package.json#version — catches divergence early.
  • Bumps npm to latest (trusted publishing requires npm ≥ 11.5.1; node 22 ships with npm 10).
  • Runs pnpm test and pnpm build before publishing.
  • npm publish --access public. No token. Auth is via npm trusted publishing (OIDC) — the workflow gets a short-lived token from npm scoped to this exact repo + workflow. Provenance is attached automatically.

Required setup on npm side (one-time)

Visit the package settings on npmjs.com → Trusted publishers → Add a publisher:

  • Publisher: GitHub Actions
  • Organization or user: phanan
  • Repository: factoria
  • Workflow filename: release.yml
  • Environment name: (leave blank)

Once that's saved, no secret is needed in this repo.

Test plan

  • Configure trusted publisher on npm (one-time)
  • Merge this PR
  • Tag and push v5.0.0 from master
  • Confirm the Release workflow runs green and [email protected] appears on npm with provenance attestation

Triggered by tags matching v*. Verifies tag matches package.json
version, runs tests + build, then `npm publish --provenance --access public`.

Requires NPM_TOKEN repo secret. Uses npm publish rather than pnpm so
setup-node's registry-url can wire up NODE_AUTH_TOKEN automatically.
@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

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

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9565261c-8b99-4b47-a57b-effef4c114b0

📥 Commits

Reviewing files that changed from the base of the PR and between 3803598 and aefe18d.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-release-workflow

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
Review rate limit: 0/1 reviews remaining, refill in 33 minutes and 24 seconds.

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

@phanan phanan merged commit 68214a8 into master May 1, 2026
3 checks passed
@phanan phanan deleted the add-release-workflow branch May 1, 2026 12:00
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