refactor(ci): validate releases once and reuse artifacts on retry - #30
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe release process now validates package name and version, prepares release tags before CI, tests the selected immutable commit, uploads a reusable npm artifact, and publishes it after CI succeeds. The workflows and release documentation now describe the updated retry and recovery behavior. ChangesRelease flow
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant ReleasePlease
participant ReleaseWorkflow
participant CIWorkflow
participant NpmRegistry
ReleasePlease->>ReleaseWorkflow: prepare release target and version
ReleaseWorkflow->>CIWorkflow: run selected commit with release version
CIWorkflow-->>ReleaseWorkflow: upload npm-packages artifact
ReleaseWorkflow->>NpmRegistry: publish downloaded npm packages
Merge Risk: ⚪ Minimal · up to No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Release currently validates the push and then runs the entire CI pipeline again for the selected tag. This changes it to three stages: prepare → CI → publish. Resolve the release commit first and validate it once; the existing Go consumer test checks the public tag during releases, replacing the separate Go release job.
If publishing fails, use Re-run failed jobs (
gh run rerun RUN_ID --failed). The successful preparation and CI jobs are reused, and npm downloads the original tested tarball. Keep the artifact for 30 days to match GitHub's retry window. An upload already accepted by npm becomes a no-op on retry. An explicit recovery run remains available if the artifact expires or is deleted.Remove the second CI call, alternate artifact names, and custom commit/digest metadata. Keep immutable tag resolution, package/version checks, constant registry URLs, and protection against downgrading npm latest. Tags now precede release CI; npm still waits for every check to pass. A source failure requires a corrected release, not moving existing public tags.
Validation: seven release regression tests; actionlint; git diff --check; workflow graph checks for one CI invocation, matching artifact names, retention, and selected-commit checkouts. The updated Go consumer step is also exercised locally against the existing v0.3.0 tag. PR CI and CodeQL validate the follow-up; this PR does not publish a new release.
Summary by CodeRabbit
Release Process
Documentation