Skip to content

Commit 8faaeb3

Browse files
authored
build-all-goreleaser (#709)
1 parent 04911ca commit 8faaeb3

File tree

2 files changed

+43
-11
lines changed

2 files changed

+43
-11
lines changed

.github/workflows/tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: npm i && npm run build
2222
working-directory: frontend
2323
- name: Install UPX
24-
run: sudo apt-get install -y upx
24+
run: sudo apt-get install -y upx gcc-multilib g++-multilib
2525
- name: Run GoReleaser
2626
uses: goreleaser/goreleaser-action@v6
2727
with:

backend/.goreleaser.yaml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ project_name: filebrowser
33
version: 2
44

55
builds:
6-
# Build configuration for darwin and linux
7-
- id: default
6+
# Build configuration for linux amd64/arm64
7+
- id: linux
8+
env:
9+
- CGO_ENABLED=1
10+
tags:
11+
- mupdf
812
ldflags: &ldflags
913
- -s -w -X github.com/gtsteffaniak/filebrowser/backend/common/version.Version={{ .Version }} -X github.com/gtsteffaniak/filebrowser/backend/common/version.CommitSHA={{ .ShortCommit }}
1014
main: main.go
@@ -13,8 +17,21 @@ builds:
1317
- linux
1418
goarch:
1519
- amd64
16-
- arm
1720
- arm64
21+
hooks:
22+
post:
23+
- upx {{ .Path }} # Compress the binary with UPX
24+
25+
# Build configuration for linux
26+
- id: linux-arm32
27+
ldflags: &ldflags
28+
- -s -w -X github.com/gtsteffaniak/filebrowser/backend/common/version.Version={{ .Version }} -X github.com/gtsteffaniak/filebrowser/backend/common/version.CommitSHA={{ .ShortCommit }}
29+
main: main.go
30+
binary: filebrowser
31+
goos:
32+
- linux
33+
goarch:
34+
- arm
1835
goarm:
1936
- "6"
2037
- "7"
@@ -24,6 +41,10 @@ builds:
2441

2542
# Build configuration for windows without arm
2643
- id: windows
44+
env:
45+
- CGO_ENABLED=1
46+
tags:
47+
- mupdf
2748
ldflags: *ldflags
2849
main: main.go
2950
binary: filebrowser
@@ -35,26 +56,37 @@ builds:
3556
post:
3657
- upx {{ .Path }} # Compress the binary with UPX
3758

38-
# Build configuration for macos without upx
39-
- id: macos
59+
# Build configuration for freebsd without arm & upx
60+
- id: freeBSD
61+
env:
62+
- CGO_ENABLED=1
63+
tags:
64+
- mupdf
4065
ldflags: *ldflags
4166
main: main.go
4267
binary: filebrowser
4368
goos:
44-
- darwin
69+
- freebsd
4570
goarch:
4671
- amd64
47-
- arm64
72+
hooks:
73+
post:
74+
- upx {{ .Path }} # Compress the binary with UPX
4875

49-
# Build configuration for freebsd without arm & upx
50-
- id: freeBSD
76+
# Build configuration for macos without upx
77+
- id: macos
78+
env:
79+
- CGO_ENABLED=1
80+
tags:
81+
- mupdf
5182
ldflags: *ldflags
5283
main: main.go
5384
binary: filebrowser
5485
goos:
55-
- freebsd
86+
- darwin
5687
goarch:
5788
- amd64
89+
- arm64
5890

5991
archives:
6092
- name_template: >

0 commit comments

Comments
 (0)