File tree 2 files changed +55
-12
lines changed 2 files changed +55
-12
lines changed Original file line number Diff line number Diff line change
1
+ name : goreleaser
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' *'
6
+ permissions :
7
+ contents : write
8
+ jobs :
9
+ goreleaser :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v4
14
+ with :
15
+ fetch-depth : 0
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v3
18
+ - name : Set up Go
19
+ uses : actions/setup-go@v5
20
+ with :
21
+ go-version-file : ' go.mod'
22
+ check-latest : true
23
+ cache : true
24
+ - name : Docker Login
25
+ uses : docker/login-action@v3
26
+ with :
27
+ registry : https://index.docker.io/v1/
28
+ username : ${{ secrets.DOCKER_HUB_USER }}
29
+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
30
+ - name : Import GPG key
31
+ id : import_gpg
32
+ uses : crazy-max/ghaction-import-gpg@v6
33
+ with :
34
+ gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
35
+ passphrase : ${{ secrets.GPG_PASSPHRASE }}
36
+ - name : Run GoReleaser
37
+ uses : goreleaser/goreleaser-action@v6
38
+ with :
39
+ distribution : goreleaser
40
+ version : ' ~> v2'
41
+ args : release --clean
42
+ env :
43
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
+ GPG_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
Original file line number Diff line number Diff line change
1
+ version : 2
1
2
builds :
2
- -
3
- binary : fabio
3
+ - binary : fabio
4
4
env :
5
5
- CGO_ENABLED=0
6
6
goos :
@@ -17,25 +17,26 @@ builds:
17
17
- arm64
18
18
goarm :
19
19
- 7
20
-
21
20
archives :
22
21
- id : bin
23
22
name_template : ' {{ .ProjectName }}-{{ .Version }}-{{ .Os }}_{{ .Arch }}'
24
23
format : binary
25
-
26
24
source :
27
25
enabled : true
28
26
name_template : ' {{ .ProjectName }}-{{.Version }}.src'
29
27
prefix_template : ' {{ .ProjectName }}-{{.Version }}/'
30
-
31
-
32
28
checksum :
33
29
name_template : ' {{.ProjectName}}-{{.Version}}.sha256'
34
-
35
30
signs :
36
- -
37
- artifacts : checksum
38
-
31
+ - artifacts : checksum
32
+ args :
33
+ - " --batch"
34
+ - " --local-user"
35
+ - " {{ .Env.GPG_FINGERPRINT }}"
36
+ - " --output"
37
+ - " ${signature}"
38
+ - " --detach-sign"
39
+ - " ${artifact}"
39
40
dockers :
40
41
- dockerfile : Dockerfile-goreleaser
41
42
use : buildx
@@ -52,7 +53,6 @@ dockers:
52
53
- " --label=org.opencontainers.image.version={{.Version}}"
53
54
extra_files :
54
55
- fabio.properties
55
-
56
56
- dockerfile : Dockerfile-goreleaser
57
57
use : buildx
58
58
goos : linux
@@ -68,7 +68,6 @@ dockers:
68
68
- " --label=org.opencontainers.image.version={{.Version}}"
69
69
extra_files :
70
70
- fabio.properties
71
-
72
71
docker_manifests :
73
72
- name_template : ' fabiolb/fabio:latest'
74
73
image_templates :
You can’t perform that action at this time.
0 commit comments