ci: use draft releases to support immutable GitHub releases#48
Merged
ci: use draft releases to support immutable GitHub releases#48
Conversation
Contributor
🤖 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:
|
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 f03cd4d. Configure here.
kinyoklion
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Requirements
N/A — CI-only changes with no functional code modifications.
Related issues
Supports the org-wide migration to immutable GitHub releases, which prevents modifying a release after it has been published.
Describe the solution you've provided
LaunchDarkly has enabled immutable GitHub releases. Once a release is published, it cannot be modified — which breaks workflows that upload artifacts after release-please creates and publishes the release. This repo uploads
package.zipas a release artifact, so it needs the draft release pattern.This PR makes the following changes:
Draft releases & force-tag-creation (
release-please-config.json): Added"draft": trueso release-please creates draft (unpublished) releases, allowing artifacts to be uploaded before the release goes live. Also added"force-tag-creation": true(not yet supported by release-please, but included for forward compatibility once support lands).Split release-please pattern (
release-please.yml): Therelease-pleasejob now runs release-please in two passes to ensure tags exist before release-please checks for them:skip-github-pull-request: true): Only creates releases (no PRs). If a release is created, the job checks out the repo and creates the Git tag manually (idempotent — skips if tag already exists).skip-github-release: true, conditional): Only runs if no release was created in the first pass, and only creates/updates PRs. This prevents release-please from creating duplicate release PRs because it depends on the tag existing when determining if a release PR is needed.Publish-release job (
release-please.yml): A newpublish-releasejob runs afterrelease-packagecompletes and un-drafts the release viagh release edit --draft=false.Manual publish workflow (
manual-publish.yml): Added apublish_releaseboolean input (default:true) and apublish-releasejob that un-drafts the release afterbuild-publishcompletes. Settingpublish_releasetofalseallows operators to keep the release in draft state after artifact uploads.Pinned action version:
release-please-actionpinned to@16a9c90856f42705d54a6fda1823352bdc62cf38(v4.4.0).The original single-job workflow was split into three jobs (
release-please→release-package→publish-release). This follows the canonical pattern fromlaunchdarkly/ld-relaycommit 1581de9.Key review points:
releases_created(plural) to gate checkout/CI andrelease_created(singular) to gate the upload step. This distinction is preserved:releases_createdgates therelease-packagejob, whilerelease_createdgates the upload step andpublish-releasejob.env:variables inrun:blocks to avoid script injection.${{ github.repository }}is used only in safe contexts (GitHub-controlled, not user input).publish-releasejob'sneedsarray inrelease-please.ymlincludes bothrelease-pleaseandrelease-package, ensuring the release is only un-drafted after all artifacts are uploaded.manual-publish.yml, thepublish-releasejob is gated on!inputs.dry_run && inputs.publish_release. Ifdry_runis true orpublish_releaseis false, the release stays in draft.release_created != 'true') correctly covers the case where release-please has pending version bumps but no release was created this run../.github/actions/publishcomposite action usesgh release uploadwith--clobberor otherwise handles the draft release state correctly.force-tag-creationhas no effect today but will activate automatically once a supporting release-please version is available, at which point the manual tag creation step can be removed.Describe alternatives you've considered
None — this follows the canonical pattern established in
launchdarkly/ld-relay.Additional context
./.github/actions/publishcomposite action usesgh release upload ${{ inputs.tag_name }}with inline interpolation rather than an env var — this is outside the scope of this PR but worth noting for a future hardening pass.Link to Devin session: https://app.devin.ai/sessions/7d5bda4d9dbe4ae0b950b30a50485e60
Requested by: @keelerm84
Note
Medium Risk
Changes the release automation workflow (release/tag creation and publishing order), which could affect release publishing/tagging if conditions or GH CLI steps misfire. No runtime code changes, but failures would block or incorrectly publish releases.
Overview
Moves the release pipeline to a draft-release pattern so release artifacts can be uploaded before a GitHub release is published/immutable.
release-pleaseis split into a two-pass flow that creates draft releases first, then ensures the corresponding git tag exists (creating it if needed), and only creates/updates release PRs when no release was created. Packaging/artifact upload is moved into a dependentrelease-packagejob, followed by a newpublish-releasejob that un-drafts the release viagh release edit --draft=false.Manual publishing gains a
publish_releaseinput and a follow-on job to optionally un-draft the release after uploading artifacts, andrelease-please-config.jsonnow enablesdraft: true(plusforce-tag-creation: truefor forward compatibility).Reviewed by Cursor Bugbot for commit 967d0fe. Bugbot is set up for automated code reviews on this repo. Configure here.