-
Notifications
You must be signed in to change notification settings - Fork 82
/
.goreleaser.yml
153 lines (116 loc) · 4.44 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
version: 2
project_name: SatisfactoryModManager
before:
hooks:
- go generate -x -tags tools ./...
- go mod tidy
# Apparently only wails build generates the embedded directory
- mkdir -p frontend/build
- touch frontend/build/.gitkeep
- wails generate module -tags webkit2_41 # I have no idea why, but if the tag isn't set here, the final artifact will depend on webkit2gtk-4.0
- pnpm -C frontend install
- pnpm -C frontend build
### Build
builds:
- id: standalone
targets:
- windows_amd64
- linux_amd64
- darwin_universal
gobinary: task
ldflags:
# The default args
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
# Auto-update mode
- -X main.updateMode=standalone
flags:
- -- # Marker for task to interpret remaining arguments as CLI_ARGS
- -s
- -skipbindings
overrides:
- goos: linux
goarch: amd64
goamd64: v1
tags:
- webkit2_41
- id: appimage
binary: SatisfactoryModManager.AppImage # Parallel builds would overwrite each other, so we need to specify the binary name
goos:
- linux
goarch:
- amd64
gobinary: task
command: build:linux:appimage
ldflags:
# The default args
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
# Auto-update mode
- -X main.updateMode=appimage
flags:
- -- # Marker for task to interpret remaining arguments as CLI_ARGS
- -s
- -skipbindings
tags:
- webkit2_41
- id: nsis
binary: SatisfactoryModManager-Setup # This name must match the nsis script OutFile, so the installer overwrites the wails built exe
goos:
- windows
goarch:
- amd64
gobinary: task
ldflags:
# The default args
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
# Auto-update mode
- -X main.updateMode=nsis
flags:
- -- # Marker for task to interpret remaining arguments as CLI_ARGS
- -s
- -skipbindings
- -nsis
### Package
archives:
- id: windows-nsis
builds:
- nsis
format: binary
name_template: SatisfactoryModManager-Setup
- id: appimage
builds:
- appimage
format: binary
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}.AppImage'
- id: standalone
builds:
- standalone
format: binary
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if eq .Os "darwin" }}.zip{{ end }}'
format_overrides:
# Skip the windows standalone build, as it is not ready yet
- goos: windows
format: none
checksum:
name_template: 'checksums.txt'
report_sizes: true
### Release
snapshot:
version_template: '{{ .Version }}+{{ if ne .Branch "master" }}{{ .Branch }}.{{ end }}{{ .ShortCommit }}'
release:
draft: true
name_template: "{{.ProjectName}} v{{.Version}}"
# Include all artifacts
header: |
## Installation
| Windows | Linux | MacOS |
|:-------:|:-----:|:-----:|
| [Download](https://github.com/satisfactorymodding/SatisfactoryModManager/releases/download/v{{.Version}}/SatisfactoryModManager-Setup.exe) | [Download (AppImage)](https://github.com/satisfactorymodding/SatisfactoryModManager/releases/download/v{{.Version}}/SatisfactoryModManager_linux_amd64.AppImage) | [Download](https://github.com/satisfactorymodding/SatisfactoryModManager/releases/download/v{{.Version}}/SatisfactoryModManager_darwin_universal.zip) |
| | [Download (standalone)](https://github.com/satisfactorymodding/SatisfactoryModManager/releases/download/v{{.Version}}/SatisfactoryModManager_linux_amd64) <br/> *requires libwebkit2gtk-4.1 <br/> and gst-plugins-good* | |
If you already have Satisfactory Mod Manager installed, you don't need to download it again, it will auto-update.
### Code Signing Policy
Windows binaries are [signed](https://github.com/satisfactorymodding/SatisfactoryModManager/#code-signing-policy) using free code signing provided by [SignPath.io](https://about.signpath.io/), certificate by [SignPath Foundation](https://signpath.org/)
templated_extra_files:
- src: ./build/smm2/latest.yml.tmpl
dst: latest.yml
- src: ./build/smm2/latest-linux.yml.tmpl
dst: latest-linux.yml