Repository navigation
Publish a prerelease only after its files are uploaded - #187
Merged
Merged
Conversation
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.
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.
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 prereleasesoftprops/action-gh-releasepublishes 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.ymlkeeps a prerelease as a draft while the action uploads to it, and a new step publishes it withgh 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.mddescribes 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.1can 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.