Skip to content

feat(release): hand what the release built to a publisher repository - #34

Merged
bpapaspyros merged 2 commits into
mainfrom
feat/release-publish-dispatch
Oct 27, 2026
Merged

bpapaspyros merged 2 commits into
mainfrom
feat/release-publish-dispatch

Conversation

@bpapaspyros

@bpapaspyros bpapaspyros commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What and why

A release merge now builds its packages, but the .debs stop at the run's artifacts. Publishing needs a runner that can reach the publish host, and self-hosted runners never take jobs from public repositories. So the public repository hands the build over to a private publisher repository, which publishes from a self-hosted runner.

  • reusable_release_tag.yml gets a publish job after build:
    • it lists the run's artifacts and keeps those of the released packages that built, per distro and architecture. A leg that failed uploaded nothing and is left out;
    • it sends them in one repository_dispatch to the private repository named by the RELEASE_PUBLISHER organization variable, or the publisher input;
    • the dispatch token is minted from the release GitHub App and limited to that one repository, with Contents write.
  • Without a publisher named, or without the App secrets (the caller's tag job needs secrets: inherit), the run warns that nothing was published and stays green.
  • reusable_release_publish.yml installs an SSH client where a runner image lacks one.

Testing

  • Ran the dispatch step against a mock of the GitHub API, with three of four legs built:
    • it handed over exactly the three built artifacts;
    • each carried the package, version, tag, root, distro and architecture;
    • the dispatch carried the App token, and listing the artifacts used the run's own token.
  • This has not run on GitHub yet.
  • Tests updated, or not applicable
  • Docs updated, or not applicable
  • This changes or removes something existing (if so, title needs ! and means the next release is a major version bump)

Notes

  • A releasing repository adds secrets: inherit to its tag job to publish.
  • The publisher repository checks each artifact against its release tag before publishing, so a dispatch can only publish a real tagged release.

@bpapaspyros
bpapaspyros added this pull request to stack #37 October 27, 2026 09:32
@bpapaspyros
bpapaspyros force-pushed the feat/release-publish-dispatch branch from 5ab530f to 8ad54ae Compare October 27, 2026 10:01
@bpapaspyros bpapaspyros self-assigned this Oct 27, 2026
@bpapaspyros
bpapaspyros requested a review from mbloechli October 27, 2026 14:05
After building, the tag workflow dispatches the run's built artifacts to
the private repository the RELEASE_PUBLISHER organization variable names,
which publishes them from a self-hosted runner: self-hosted runners never
take jobs from public repositories. The publish workflow installs an SSH
client where a runner image lacks one.
@bpapaspyros
bpapaspyros force-pushed the feat/release-publish-dispatch branch from 8ad54ae to c726ba9 Compare October 27, 2026 14:05
Comment thread .github/workflows/reusable_release_tag.yml Outdated
@mbloechli
mbloechli self-requested a review October 27, 2026 16:05

@mbloechli mbloechli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me otherwise

@bpapaspyros
bpapaspyros merged commit 1e7c9a2 into main Oct 27, 2026
3 checks passed
@bpapaspyros
bpapaspyros deleted the feat/release-publish-dispatch branch October 27, 2026 16:16
@duatic-release duatic-release Bot mentioned this pull request Oct 27, 2026
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.

2 participants