Skip to content

Publish a prerelease only after its files are uploaded - #187

Merged
vesnicancz merged 1 commit into
masterfrom
fix/prerelease-publish-after-upload
Nov 5, 2026
Merged

vesnicancz merged 1 commit into
masterfrom
fix/prerelease-publish-after-upload

Conversation

@vesnicancz

Copy link
Copy Markdown
Owner

The first prerelease, v1.18.0-beta.1, went out with no files. Every build passed, but the release job failed with "Cannot upload asset ... to an immutable release". The repository has immutable releases on, and for a prerelease softprops/action-gh-release publishes first and uploads afterwards. A stable release isn't affected, because the action uploads to a draft and only then publishes it.

What changes

  • release.yml keeps a prerelease as a draft while the action uploads to it, and a new step publishes it with gh release edit --draft=false. Both conditions are the same check for a dash in the tag, so a stable release skips the new step and behaves as before.
  • docs/developer-guide.md describes this. It also warns that, according to GitHub's documentation, the name of a deleted immutable release's tag can't be used again, so another attempt needs another number.

Testing

Not tested. The workflow only runs on a tag, so the next prerelease tag will be the first real run. I only checked that the file parses as YAML. After that run, check on the releases page that the release has all 13 files, is marked as a prerelease, and that Latest is still v1.17.0.

Whether the name v1.18.0-beta.1 can be used again is also untested. The empty release and its tag have been deleted, so trying that tag after the merge will show it.

The repository has immutable releases on, and the release action publishes
a prerelease before uploading to it, so v1.18.0-beta.1 went out empty. Keep
a prerelease as a draft until the upload is done and publish it in a step
of its own.
@vesnicancz
vesnicancz merged commit 58f2466 into master Nov 5, 2026
6 checks passed
@vesnicancz
vesnicancz deleted the fix/prerelease-publish-after-upload branch November 5, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant