Skip to content

Commit 7a95692

Browse files
authored
feat: generate vendor archive for Gentoo packaging (#131)
* feat: generate vendor archive for Gentoo packaging On release, generate a `_vendor.tar.xz` archive, so a Gentoo package can use proper vendoring without using third party repository or other sources. Resolves #125 References: - #125 - gentoo/guru@23487b9#commitcomment-142489696 - https://wiki.gentoo.org/wiki/Writing_go_Ebuilds Signed-off-by: Victoria Nadasdi <victoria@efertone.me> * sign all artifacts Signed-off-by: Victoria Nadasdi <victoria@efertone.me> --------- Signed-off-by: Victoria Nadasdi <victoria@efertone.me>
1 parent a1dd76e commit 7a95692

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
with:
2727
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
2828
passphrase: ${{ secrets.GPG_PASSPHRASE }}
29+
- name: Create vendor directory
30+
run: |
31+
go mod vendor
2932
- name: Run GoReleaser
3033
uses: goreleaser/goreleaser-action@v5
3134
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ totp-cli
33
coverage.out
44
.idea
55
dist/
6+
vendor/

.goreleaser.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ archives:
2929
format_overrides:
3030
- goos: windows
3131
format: zip
32+
- id: vendor-package
33+
format: tar.xz
34+
meta: true
35+
name_template: "{{ .ProjectName }}_vendor"
36+
files:
37+
- vendor/*
38+
- vendor/**/*
39+
40+
# That's sad:
41+
# This feature is only available in GoReleaser Pro.
42+
# hooks:
43+
# before:
44+
# - go mod vendor
45+
# after:
46+
# - rm -rf vendor
3247

3348
changelog:
3449
sort: asc
@@ -38,7 +53,7 @@ changelog:
3853
- "^test:"
3954

4055
signs:
41-
- artifacts: checksum
56+
- artifacts: all
4257
cmd: gpg2
4358
args:
4459
- "--batch"

0 commit comments

Comments
 (0)