ci: use draft releases for immutable GitHub releases support#102
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Since actions/attest@v4 stores attestations via GitHub's attestation API (not as release assets), repos that only use attestation don't need draft releases. Release-please can publish the release directly. Changes: - Remove draft:true from release-please-config.json - Remove create-tag job/steps (force-tag-creation handles this) - Remove publish-release job (release is published directly) - Remove publish_release input from manual workflows
force-tag-creation only operates in conjunction with draft releases. Since this repo does not use draft releases (attestation-only, no artifact uploads to the release), force-tag-creation is not needed.
|
Devin, the pages publish action uploads to the release, which means we do need the draft change. Run gh release upload 3.6.0 build/ld-relay-3.6.0.tgz --clobber |
…e releases The publish-gh-pages action uploads tarballs to the GitHub release via gh release upload, which fails under immutable releases. This repo needs the draft release pattern: - release-please-config.json: added draft: true and force-tag-creation: true - release-please.yml: split release-please into two passes (releases first, then PRs), inline tag creation, and publish-release job to un-draft - manual-publish.yml: added tag input, publish_release input, and publish-release job with format() boolean/string safety
|
@kinyoklion You're right —
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2fb7b68. Configure here.

Requirements
N/A — CI-only changes, no application code or tests affected.
Related issues
Supports the org-wide migration to immutable GitHub releases. Reference implementation:
launchdarkly/ld-relay(branchv8).Describe the solution you've provided
The
.github/actions/publish-gh-pagescomposite action runsgh release uploadto attach the packaged Helm chart.tgzto the GitHub release. Under immutable releases, this fails because the release is already published when the upload runs. This repo therefore needs the draft release pattern: create a draft release, upload all artifacts, then publish.Changes across four files:
release-please-config.json— Added"draft": trueso release-please creates draft (unpublished) releases, and"force-tag-creation": truefor forward compatibility once release-please supports it natively.release-please.yml— Implemented the split release-please pattern:skip-github-pull-request: true): Only creates releases (no PRs). If a release is created, checks out the repo and creates/pushes the git tag inline (idempotent — skips if tag already exists).skip-github-release: true, conditional): Only runs if no release was created; creates/updates PRs. This ordering ensures the tag exists before release-please evaluates whether a release PR is still needed.release-packagejob is gated onrelease_created == 'true'at the job level (per-stepifguards removed). Checks out the tag directly viaref: ${{ needs.release-please.outputs.tag_name }}and passes it topublish-ghcr.publish-releasejob un-drafts the release afterrelease-packagecompletes, also gated onrelease_created.googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38(v4.4.0).manual-publish.yml— Added:taginput (required) — references an existing draft release. Checkout usesref: ${{ inputs.tag }}so the built chart version matches the release. Tag is also forwarded topublish-ghcr.publish_releaseinput (boolean, defaulttrue) — controls whether the release is un-drafted after artifact uploads.publish-releasejob gated onformat('{0}', inputs.publish_release) == 'true' && format('{0}', inputs.dry_run) == 'false'for boolean/string safety acrossworkflow_dispatchandworkflow_calltriggers..github/actions/publish-ghcr/action.yml— Added optionalrefinput. When provided, the composite's internal checkout uses the specified ref; otherwise falls back togithub.sha(the exact triggering commit). This ensures the GHCR artifact is always built from the same ref as the gh-pages artifact.Updates since last revision
release_createdusage: Switched all gates fromreleases_created(plural) torelease_created(singular) since this repo only releases one package. Removed the unusedreleases_createdoutput.release-please.ymlandmanual-publish.ymlnow explicitly pass the tag to thepublish-ghcraction via its newrefinput, and therelease-packagejob checks out the tag directly. This eliminates reliance ongithub.ref(branch HEAD) which could drift if another commit lands between job start and checkout.publish-ghcrfallback: Changed the default checkout fallback fromgithub.reftogithub.shato preserve the original behavior of checking out the exact triggering commit rather than the branch HEAD.contents: writecomments from "Contents and pull-requests are for release-please to make releases" to "Needed for publish-gh-pages to upload release assets" in both workflow files.Describe alternatives you've considered
An earlier revision assumed this repo was attestation-only (no release asset uploads), which would not require draft releases. This was incorrect —
publish-gh-pagesuploads the chart tarball as a release asset.Additional context
Key review points:
publish-releaseinrelease-please.ymlwaits on all artifact-uploading jobs. Currentlyneeds: ['release-please', 'release-package']— confirmrelease-packageis the only job that uploads to the release.ifcondition on the second call correctly prevents duplicate release PRs.release_created(singular) across all job gates.publish-gh-pagesaction usesgh release upload ${{ steps.version.outputs.CHART_VERSION }}— the version comes fromhelm show chart .on the checked-out code. In the automated workflow, this now reads from the tag ref. In the manual workflow, it reads frominputs.tag. Confirm both paths produce the correct version.publish-gh-pagesaction line 57 uses inline${{ steps.version.outputs.* }}in arun:block. Low risk since the value comes fromhelm show chart, but worth noting for a future hardening pass.force-tag-creationhas no effect with the current release-please version — it is a forward-compatibility placeholder. Confirm it does not cause errors.Link to Devin session: https://app.devin.ai/sessions/7d5bda4d9dbe4ae0b950b30a50485e60
Requested by: @keelerm84
Note
Medium Risk
Medium risk because it restructures the release automation (tag creation, artifact publishing, and release publication) and could break or mis-sequence releases if conditions/refs are wrong.
Overview
Switches the release pipeline to a draft-release model so Helm chart artifacts can be uploaded before the GitHub release is published.
release-pleaseis split into a release-creation pass (then idempotent tag creation) and a PR-creation-only pass; downstream packaging now checks out and builds from the created tag, publishes to GH Pages/GHCR, and then a new job un-drafts the release viagh release edit.Manual publishing now requires a
tag(checks out that ref), forwards it intopublish-ghcr, and can optionally publish (un-draft) the release after uploads. Thepublish-ghcrcomposite action is updated to accept a requiredrefand checkout that ref before building/pushing.Reviewed by Cursor Bugbot for commit fe926a9. Bugbot is set up for automated code reviews on this repo. Configure here.