Repository navigation
Attach Linux .deb/.rpm packages to GitHub Releases - #202
Merged
Merged
Conversation
The build-linux-packages workflow already built .deb/.rpm files on publish, but only uploaded Actions artifacts. Add a follow-up job that downloads those packages, writes SHA256SUMS, and uploads them to the triggering release with gh release upload. workflow_dispatch now requires a tag so past releases can be rebuilt and backfilled. Checkout uses that tag (or github.event.release.tag_name). GITHUB_TOKEN with contents: write is enough when release-drafter publishes the release. Docs now point at the release assets from 3.3.1 on. Co-authored-by: Kenneth Belitzky <kenny@belitzky.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
build-linux-packagesalready builds.deband.rpmfiles on each published release, but it only uploaded them as Actions artifacts (90-day retention). They never landed on the GitHub Release. Example: v3.3.1 run 40331035142.Change
upload-release-assetsjob downloads every package artifact, writesSHA256SUMS, and runsgh release upload "$TAG" dist/*.deb dist/*.rpm dist/SHA256SUMS --clobber.permissions: contents: writesoGITHUB_TOKENcan attach assets. This works when the release is published by release-drafter /GITHUB_TOKEN(thereleaseevent already fires; uploading withGITHUB_TOKENis enough).github.event.release.tag_nameonreleaseevents.workflow_dispatchnow requires ataginput. The workflow checks out that tag, builds, and uploads to that release so past releases can be backfilled.structkit_3.3.1_amd64.deb,structkit-3.3.1-1.x86_64.rpm, etc.); the job fails if a produced file is missing version or arch.docs/installation.md, plus the matching README / packaging notes) now say packages are attached to each GitHub release from 3.3.1 on, withcurl+apt/dnfinstall examples using the real asset names.v3.3.1 backfill
The packages from run 40331035142 were attached to v3.3.1 already (no need to wait for this merge):
structkit_3.3.1_amd64.debstructkit_3.3.1_arm64.debstructkit-3.3.1-1.x86_64.rpmstructkit-3.3.1-1.aarch64.rpmSHA256SUMSValidation
actionlintv1.7.12: clean for this workflow (the only repo finding is a pre-existingif: falseinpush-to-registry.yaml).pre-commit(check-yaml,end-of-file-fixer,trailing-whitespace) passed on the changed files.