Conversation
Manually-triggered workflow that bumps the version across the three
@fluffylabs/jammin* package.json files, opens a PR against main, and
creates a draft GitHub release. Once the maintainer merges the PR and
publishes the draft release, the existing publish-npm-{cli,sdk}
workflows fire on `release: published` and ship the artifacts to npm.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis pull request introduces a new GitHub Actions workflow that automates release preparation. The workflow accepts a semantic version, normalizes it into a tag and branch name, validates that no conflicts exist, bumps versions in three package.json files using Bun, creates a release branch, drafts a GitHub release, and opens a PR back to main with release metadata. ChangesRelease Preparation Workflow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release-prepare.yml:
- Around line 71-74: The current preflight treats any non-zero exit from "gh
release view $TAG" as missing release; change it to capture the command's exit
code and handle cases: if exit code is 0 -> print "Error: release '$TAG' already
exists" to stderr and exit 1; if exit code is 1 -> treat as "not found" and
continue; for any other non-zero exit -> print an operational error to stderr
including the exit code and a short hint (authentication/network/rate-limit) and
exit with that non-zero code. Implement this logic around the existing "gh
release view \"$TAG\"" invocation so the check distinguishes found (0), not
found (1), and other failures (propagate error).
- Around line 27-35: The workflow uses floating action tags actions/checkout@v4
and oven-sh/setup-bun@v1 which weakens supply-chain guarantees; update those
usages to pin to immutable commit SHAs (replace actions/checkout@v4 and
oven-sh/setup-bun@v1 with their corresponding full commit SHA refs) and apply
the same SHA pinning consistently across all workflows in the repo so the
release-prepare.yml change matches other CI files.
- Around line 99-101: Before running the git commit step (the block that runs
"git add package.json bin/cli/package.json packages/jammin-sdk/package.json" and
"git commit -m ..."), add a guard that checks for an empty diff using a command
like "git diff --quiet --exit-code" or "git status --porcelain" and, if there
are no changes, skip the commit/push and emit a clear message (e.g., "No version
changes to commit, skipping release prepare step"); ensure the workflow does not
treat this case as a failure and only runs "git commit" and "git push" when the
guard detects staged changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a1bdfca0-0bbe-453e-8b4f-dfac40b37797
📒 Files selected for processing (1)
.github/workflows/release-prepare.yml
- Distinguish gh release view exit codes 0 (found), 1 (not found), and other (operational failure) so auth/network errors don't silently bypass the preflight. - Detect empty staged diff before commit to surface a clear error when the target version equals the current version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Adds
.github/workflows/release-prepare.yml, a manually-triggered workflow that prepares a release end-to-end:versioninput (e.g.,0.2.0orv0.2.0, with or without leadingv; pre-releases like0.2.0-rc.1are accepted).@fluffylabs/jammin,@fluffylabs/jammin-cli, and@fluffylabs/jammin-sdkviabun pm pkg set.release/v<version>branch, pushes, and opens a PR againstmain.tag_name=v<version>.Once the maintainer merges the PR and then publishes the draft release, the existing
publish-npm-cli.ymlandpublish-npm-sdk.ymlworkflows fire onrelease: publishedand ship the artifacts to npm.Test plan
Release - Preparemanually withversion=0.1.1-test.1(or similar).package.jsonversions changed.v0.1.1-test.1exists in the Releases tab.🤖 Generated with Claude Code