Mirror each published release, with its notes and downloads, to the GitHub mirror #270

Closed
opened 2026-10-28 22:43:20 -05:00 by ethan-hann · 2 comments
Owner

The GitHub mirror (https://github.com/ethan-hann/SavePoint) receives every commit and tag through the Forgejo push mirror, but not releases, so a visitor who finds the project on GitHub sees no Releases section and nothing to download. GitHub is where most people discover the project, so each published release should also appear there.

What to build

  • When a release is published on Forgejo (draft false), create the matching release on GitHub for the same tag: same name, the same notes, the same prerelease flag, and every asset (setup, portable zip, AppImage, nupkgs, SHA256SUMS files).

  • When a Forgejo release is renamed or edited later (for example "(pre-release, superseded)"), the GitHub release follows, or the step is idempotent and can be re-run to sync it.

  • Backfill: run it once for the existing releases, at least 0.9.21, ideally every 0.9.x release that still has its assets.

Constraints and things to check

  • Today release.yml builds a draft and the notes are added afterwards by PATCHing the draft, so the GitHub step has to run on publish, not on the tag push. Check whether Forgejo Actions supports the release: published event; if not, add a manually run workflow (workflow_dispatch with the tag) or have the release step create the GitHub release as a draft and publish it when the Forgejo one is published.

  • The tag must already be on GitHub (pushed by the mirror) before the release is created; wait for it or fail with a clear message.

  • Credential: a fine-grained GitHub token limited to ethan-hann/SavePoint with Contents read/write, stored as a Forgejo Actions secret. It may only be sent to api.github.com and uploads.github.com; never echo it, never put it on a command line or in a file, and nothing may prompt.

  • Asset names and checksums must match the Forgejo release byte for byte; verify the SHA256SUMS after upload.

  • Test the workflow logic with a stub server or dry-run mode in the build tests, as the other release scripts are tested; record the decision (where the step runs, which event) as the next numbered entry in docs/decisions.md and update the release section of the developer guide.

The GitHub mirror (https://github.com/ethan-hann/SavePoint) receives every commit and tag through the Forgejo push mirror, but not releases, so a visitor who finds the project on GitHub sees no Releases section and nothing to download. GitHub is where most people discover the project, so each published release should also appear there. **What to build** - When a release is published on Forgejo (draft false), create the matching release on GitHub for the same tag: same name, the same notes, the same prerelease flag, and every asset (setup, portable zip, AppImage, nupkgs, SHA256SUMS files). - When a Forgejo release is renamed or edited later (for example "(pre-release, superseded)"), the GitHub release follows, or the step is idempotent and can be re-run to sync it. - Backfill: run it once for the existing releases, at least 0.9.21, ideally every 0.9.x release that still has its assets. **Constraints and things to check** - Today release.yml builds a draft and the notes are added afterwards by PATCHing the draft, so the GitHub step has to run on publish, not on the tag push. Check whether Forgejo Actions supports the `release: published` event; if not, add a manually run workflow (workflow_dispatch with the tag) or have the release step create the GitHub release as a draft and publish it when the Forgejo one is published. - The tag must already be on GitHub (pushed by the mirror) before the release is created; wait for it or fail with a clear message. - Credential: a fine-grained GitHub token limited to ethan-hann/SavePoint with Contents read/write, stored as a Forgejo Actions secret. It may only be sent to api.github.com and uploads.github.com; never echo it, never put it on a command line or in a file, and nothing may prompt. - Asset names and checksums must match the Forgejo release byte for byte; verify the SHA256SUMS after upload. - Test the workflow logic with a stub server or dry-run mode in the build tests, as the other release scripts are tested; record the decision (where the step runs, which event) as the next numbered entry in docs/decisions.md and update the release section of the developer guide.
Author
Owner

Shipped in SavePoint 0.9.22 (PR #274). Built and stub-tested; D71 records it. Forgejo fires the release event: the 0.9.22 publish started a GitHub mirror run, which passed quietly because the secret isn't set yet. Still to do: create the fine-grained token, add the GH_MIRROR_TOKEN secret, then run the GitHub mirror workflow by hand with tag all to backfill.

Shipped in [SavePoint 0.9.22](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.22) (PR #274). Built and stub-tested; D71 records it. Forgejo fires the release event: the 0.9.22 publish started a GitHub mirror run, which passed quietly because the secret isn't set yet. Still to do: create the fine-grained token, add the GH_MIRROR_TOKEN secret, then run the GitHub mirror workflow by hand with tag `all` to backfill.
Author
Owner

Done. The GH_MIRROR_TOKEN secret is in place and the backfill ran: all 22 published releases (v0.9.0 to v0.9.22) are on https://github.com/ethan-hann/SavePoint/releases with their notes and files. The first backfill skipped v0.9.2 to v0.9.4, whose split .partN source archives weren't listed in SHA256SUMS.txt; PR #276 checks such parts by their joined hash and gives the workflow's tag input a type so Forgejo shows the box, and a second all run filled them in. New releases copy on publish.

Done. The GH_MIRROR_TOKEN secret is in place and the backfill ran: all 22 published releases (v0.9.0 to v0.9.22) are on https://github.com/ethan-hann/SavePoint/releases with their notes and files. The first backfill skipped v0.9.2 to v0.9.4, whose split .partN source archives weren't listed in SHA256SUMS.txt; PR #276 checks such parts by their joined hash and gives the workflow's tag input a type so Forgejo shows the box, and a second `all` run filled them in. New releases copy on publish.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#270
No description provided.