Multi target release #6
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: idle-org/rust_realease#6
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Support github endpoint
Support multiple endpoints
Problem
rust_realeasecurrently creates, uploads, and verifies a release only on thecanonical Gitea repository. Idle now mirrors selected repositories to GitHub, but
Git tags do not carry release notes or release assets. A one-time migration copied
17 releases and 161 assets (2.84 GB), which shows that future releases need a
first-class, repeatable dual-publication path.
Required behavior
Add an opt-in publication target that sends the same prepared release to both
Gitea and GitHub without rebuilding or repackaging artifacts.
Build and package once. Reuse the exact release notes, prerelease/draft state,
artifact bytes, filenames, labels, manifest, and checksum files for both hosts.
Keep Gitea-only publication fully compatible. Existing commands, configuration,
--token-file, andGITEA_TOKENmust retain their current behavior.Use explicit, independent credentials:
--gitea-token-file PATHand--github-token-file PATH;--token-file PATHas a documented backward-compatible alias for--gitea-token-file;gitea.token-envandgithub.token-envsettings,defaulting to
GITEA_TOKENandGITHUB_TOKEN;the existing token-file validation;
independent permissions, rotation, expiry, and secret handling.
Require an explicit GitHub destination, for example:
A matching CLI override such as
--github-repository-urlis acceptable. Donot infer the GitHub owner/repository from the Gitea URL.
Before mutation, verify that the release tag exists on both repositories and
resolves to the same commit (including annotated-tag peeling). Refuse a tag or
repository mismatch.
Make publication resumable and idempotent per destination:
explicitly requested the existing replacement behavior;
without rebuilding or corrupting the completed one;
Upload as drafts where supported, verify every uploaded byte, then publish.
Preserve release title, notes, prerelease state, and deliberate draft behavior.
GitHub's
make_latestbehavior must not let a prerelease replace the lateststable release.
Verify each destination independently:
SHA256SUMSentries where present;public download source.
Report a clear result matrix (
Gitea/GitHub: created, resumed, verified,failed). A failure on one host must return nonzero and identify that host while
preserving the successfully verified release on the other host.
Security constraints
api.github.comanduploads.github.com, aftervalidating the request host; follow downloads anonymously when the repository is
public.
Contents: read and write. No organization administration permission is needed.
Design boundary
Introduce a small release-host interface only where it removes the current Gitea
coupling in release creation, upload, and verification. Keep build, packaging,
artifact discovery, checksum generation, and cargo-binstall logic host-independent.
Do not turn this task into a general forge plugin system, release polling service,
webhook receiver, or historical migration command.
Tests and acceptance
URL/host validation, tag comparison, release metadata conversion, and GitHub API
error handling.
partial resume, different-content collision, replacement, draft/prerelease state,
upload failure on either host, digest mismatch, and retry after interruption.
failure semantics, token rotation, and the self-release procedure.
repository's 80% coverage floor.
release notes, status, every asset digest, anonymous download, and isolated
cargo-binstall installation. Do not alter an existing production release during
acceptance.
Example invocation
The normal dry run should describe both destinations and required credentials
without reading or displaying the token values.