mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-10-23 03:37:01 +09:00
Reconcile the release target when updating an existing release (#4454) * Reconcile the release target when updating an existing release A pre-existing draft release (for example one created by the Release Drafter job on the default branch) kept its original target_commitish, because --target was only passed on the create path. Reconcile it on the update path too, and require target_ref to be chosen explicitly instead of defaulting to main. * Clean up comments in create-release.yml Removed comments about reconciling target for releases. * Refine target_ref description for better understanding Clarify target_ref description in create-release.yml * Refuse to attach an archive to a tag pointing at a different commit An existing tag pins the release to a commit, and both --target on create and target_commitish on update are ignored once it exists. Verify the tag's peeled commit matches the checked-out ref before uploading so a re-run against a moved branch cannot publish an artifact that does not match the tag. * Validate the release tag before uploading the archive to R2 The tag/commit check ran inside the GitHub release step, after the archive had already been mirrored to R2, so a mismatched tag could overwrite the version-specific download object before the job failed. Run it as a standalone step ahead of the R2 upload instead.