Skip to content

Commit c9374d8

Browse files
authored
Merge pull request #61 from arran4/codex/update-or-create-goreleaser-pipeline
Update GoReleaser configuration
2 parents 0ea7576 + f810745 commit c9374d8

File tree

2 files changed

+37
-27
lines changed

2 files changed

+37
-27
lines changed

.github/workflows/goreleaser.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@ jobs:
1919
fetch-depth: 0
2020
- name: Set up Go
2121
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
2224

2325
- name: Login to GitHub Container Registry
2426
uses: docker/login-action@v3
2527
with:
2628
registry: ghcr.io
2729
username: ${{ github.actor }}
2830
password: ${{ secrets.GITHUB_TOKEN }}
29-
- name: Env setup
30-
run: |
31-
sudo apt-get install build-essential
3231
- name: Test
3332
run: go test ./...
3433
- name: Run GoReleaser

.goreleaser.yaml

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
1+
version: 2
12
project_name: gobookmarks
23
builds:
3-
- env:
4-
- CGO_ENABLED=0
5-
goos:
6-
- linux
7-
- windows
8-
- darwin
9-
main: ./cmd/gobookmarks
10-
id: "gobookmarks"
4+
- id: "gobookmarks"
115
binary: gobookmarks
12-
goarch:
13-
- amd64
14-
- arm
15-
- arm64
6+
dir: cmd/gobookmarks
7+
env:
8+
- CGO_ENABLED=0
9+
flags: ["-trimpath"]
10+
goos: [linux, windows, darwin, freebsd]
11+
goarch: [amd64, arm64]
1612

1713
archives:
18-
- format: tar.gz
19-
name_template: >-
20-
{{ .ProjectName }}_
21-
{{- title .Os }}_
22-
{{- if eq .Arch "amd64" }}x86_64
23-
{{- else if eq .Arch "386" }}i386
24-
{{- else }}{{ .Arch }}{{ end }}
25-
{{- if .Arm }}v{{ .Arm }}{{ end }}
14+
-
2615
format_overrides:
27-
- goos: windows
28-
format: zip
16+
- goos: windows
17+
format: zip
2918
checksum:
3019
name_template: 'checksums.txt'
3120
snapshot:
@@ -38,8 +27,28 @@ changelog:
3827
- '^test:'
3928
dockers:
4029
- image_templates:
41-
- "ghcr.io/arran4/gobookmarks:{{ .Tag }}"
42-
- "ghcr.io/arran4/gobookmarks:latest"
30+
- "ghcr.io/arran4/gobookmarks:{{ .Tag }}-amd64"
31+
- "ghcr.io/arran4/gobookmarks:latest-amd64"
32+
dockerfile: Dockerfile
33+
goos: linux
34+
goarch: amd64
35+
use: buildx
36+
- image_templates:
37+
- "ghcr.io/arran4/gobookmarks:{{ .Tag }}-arm64"
38+
- "ghcr.io/arran4/gobookmarks:latest-arm64"
39+
dockerfile: Dockerfile
40+
goos: linux
41+
goarch: arm64
42+
use: buildx
43+
docker_manifests:
44+
- name_template: "ghcr.io/arran4/gobookmarks:{{ .Tag }}"
45+
image_templates:
46+
- "ghcr.io/arran4/gobookmarks:{{ .Tag }}-amd64"
47+
- "ghcr.io/arran4/gobookmarks:{{ .Tag }}-arm64"
48+
- name_template: "ghcr.io/arran4/gobookmarks:latest"
49+
image_templates:
50+
- "ghcr.io/arran4/gobookmarks:latest-amd64"
51+
- "ghcr.io/arran4/gobookmarks:latest-arm64"
4352
nfpms:
4453
-
4554
vendor: Ubels Software Development
@@ -51,6 +60,8 @@ nfpms:
5160
- apk
5261
- deb
5362
- rpm
63+
- termux.deb
64+
- archlinux
5465
release: 1
5566
section: default
5667
priority: extra

0 commit comments

Comments
 (0)