Skip to content

Mirror every published release to Sozo-app/sozo - #79

Merged
professorDeveloper merged 1 commit into
masterfrom
mirror-release-org
Nov 14, 2026
Merged

professorDeveloper merged 1 commit into
masterfrom
mirror-release-org

Conversation

@professorDeveloper

Copy link
Copy Markdown
Owner

When a release is published in professorDeveloper/sozo, the same release now appears in Sozo-app/sozo.

What mirror-release.yml does

  • Tag: creates the tag at the same commit, through the API. The organization's fork sees this repository's commits, so nothing is pushed and no branch is touched. The fork's master has commits of its own.
  • Release: copies the title, notes, prerelease flag and Latest state. Links to …/professorDeveloper/sozo/releases/download/… point at the copy's files instead.
  • Files: uploads every asset. The copy is built as a draft and published only after the files are attached. Publishing creates the tag, and at that point the release already exists, so the fork's own push: tags: v* release workflow stops at its gate and builds nothing.
  • Re-runs: safe. An existing copy is updated and its files are replaced (--clobber). If the organization already has the tag at a different commit, the run stops instead of overwriting it.
  • Inside the fork: if: github.repository_owner == 'professorDeveloper', so the fork never copies itself.

When it runs

  • When a release is published (the Publish button on a draft).
  • By hand: Actions → Mirror release → Sozo-app → tag.
  • From release.yml after it publishes or adds files to a published release (for example a platforms: windows run). What GITHUB_TOKEN does starts no workflow, so release.yml starts this one itself (actions: write).

Needs: the SOZO_APP_TOKEN secret, a token that can write Sozo-app/sozo. A fine-grained token with resource owner Sozo-app and Contents: read and write is enough.

Tested: the same script ran locally for sozo-tv 1.0.2 and produced https://github.com/Sozo-app/sozo-tv/releases/tag/1.0.2: the tag is on commit 0936a7eb, the APK is byte-for-byte the same, and the release is marked Latest. A second run updated that release instead of creating another one. The fork-side tag creation was also checked with a probe tag, which was then deleted.

mirror-release.yml copies the tag (made through the API at the same commit),
title, notes and files of a published release to the organization's copy.
It runs on Publish, by hand, and from release.yml when that publishes or adds
files itself. The copy is published only after its files are attached, so the
fork's own tag-triggered release.yml skips it.
@professorDeveloper
professorDeveloper merged commit 35d6344 into master Nov 14, 2026
4 checks passed
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