fix(ci): publish release as draft to support immutable releases#1558
Merged
Conversation
The repo has GitHub's immutable-releases feature enabled. softprops/action-gh-release creates `prerelease: true, draft: false` releases in a single API call, so asset uploads happen after the release is already published — which fails on immutable repos with "Cannot upload asset ... to an immutable release". Switch to `draft: true` so the action attaches assets while the release is still mutable, then publish via `gh release edit` afterwards. The release.published event still fires once, after assets are in place. Closes: https://github.com/voidzero-dev/vite-plus/actions/runs/25673521844/job/75370568926
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
cpojer
approved these changes
May 12, 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.
Summary
The release workflow fails on the asset-upload step on repos with GitHub's immutable releases feature enabled. Failing run: https://github.com/voidzero-dev/vite-plus/actions/runs/25673521844/job/75370568926
softprops/action-gh-releasecreatesprerelease: true, draft: falsein a single API call, so the release is already published by the time assets upload. On immutable repos that's rejected.Fix
gh release edit ... --draft=falsestep to publish it.The single
release.publishedevent still fires once, after assets are in place.GITHUB_TOKENalready hascontents: writeon the Release job, which is allgh release editneeds.Test plan
Releaseworkflow run withnpm_tag: alphaand verify both theCreate GitHub Release(draft) andPublish GitHub Releasesteps succeedvp-setup-*.exe) appear on the published release