Repository navigation
ci: attach a vendor tarball to releases - #227
Closed
vitaly-zdanevich wants to merge 1 commit into
Closed
vitaly-zdanevich wants to merge 1 commit into
vitaly-zdanevich wants to merge 1 commit into
Conversation
Distributions that build without network access, such as Gentoo, need the Go module dependencies as a separate tarball. Create it with go mod vendor when a release is published, or for an existing tag through workflow_dispatch, and upload it to the release. The tarball is reproducible, so re-running the workflow uploads identical bytes.
vitaly-zdanevich
force-pushed
the
release-vendor-tarball
branch
from
November 6, 2026 06:57
02c89ac to
1d59dd3
Compare
Collaborator
|
Thank you for filing a PR, but sorry we cannot accept this change.
|
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.
Distributions that build packages without network access need the Go module dependencies as a
separate tarball next to the source archive. This is common practice: Gentoo, openSUSE
(obs-service-go_modules) and Fedora
(go-vendor-tools) all package Go software
with a vendor tarball, and Gentoo's guide for Go ebuilds recommends asking upstream to generate
the tarball in CI: https://wiki.gentoo.org/wiki/Writing_go_Ebuilds#Packaging_the_dependencies
I maintain a Gentoo ebuild for spanner-cli
(https://github.com/vitaly-zdanevich/gentoo-overlay/tree/main/dev-db/spanner-cli). Because the
repository has no vendor directory, I currently generate and host the tarball myself; attaching
it to the releases here would let the ebuild, and other package managers, download it from
upstream instead.
This workflow runs
go mod vendorwhen a release is published and uploadsspanner-cli-X.Y.Z-vendor.tar.xzto that release. It can also be run manually for an existingtag, so it could attach a tarball to v0.11.2 as well. The tarball is reproducible (sorted
entries, fixed owner and modification time), so re-running the workflow uploads identical bytes.
The existing release process doesn't change.
Tested locally for v0.11.2: two runs produce byte-identical tarballs (3.4 MB), and the GitHub
source archive plus this tarball builds with
GOPROXY=off. actionlint reports no findings forthe new workflow.