-
-
Notifications
You must be signed in to change notification settings - Fork 300
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
108 lines (98 loc) · 2.58 KB
/
.goreleaser.yaml
File metadata and controls
108 lines (98 loc) · 2.58 KB
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
version: 2
project_name: spoofdpi
before:
hooks:
- go mod tidy
- sh -c 'git rev-parse --short HEAD > COMMIT'
builds:
# ---------------------------------------------------------------------------
# Linux Builds (Pure Go / Static)
# ---------------------------------------------------------------------------
# Can be built on any OS (macOS/Linux) since CGO is disabled.
- id: 'linux'
goos: [linux]
goarch:
- '386'
- amd64
- arm
- arm64
- mips
- mipsle
- mips64
- mips64le
- riscv64
gomips: [softfloat]
env: [ "CGO_ENABLED=0" ]
ldflags:
- -s -w
- -X "main.version={{ .Version }}"
- -X "main.commit={{ .ShortCommit }}"
- -X "main.build=goreleaser"
main: ./cmd/spoofdpi
binary: '{{ .ProjectName }}'
# ---------------------------------------------------------------------------
# macOS Builds (CGO Enabled)
# ---------------------------------------------------------------------------
# Requires a macOS runner.
- id: 'darwin'
goos: [darwin]
goarch: [amd64, arm64]
env: [ "CGO_ENABLED=1" ]
ldflags:
- -s -w
- -X "main.version={{ .Version }}"
- -X "main.commit={{ .ShortCommit }}"
- -X "main.build=goreleaser"
main: ./cmd/spoofdpi
binary: '{{ .ProjectName }}'
source:
enabled: true
prefix_template: '{{ .ProjectName }}-{{ .Version }}/'
files:
- COMMIT
archives:
- id: default
name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "mips64" }}mips64_hardfloat
{{- else if eq .Arch "mips64le" }}mips64le_hardfloat
{{- else }}{{ .Arch }}{{ end -}}
formats: ['tar.gz']
# Explicitly list builds to include (optional but good for clarity)
ids: ['linux', 'darwin']
# Linux Packages
nfpms:
- id: packages
ids: ['linux']
file_name_template: "{{ .ConventionalFileName }}"
formats:
- apk
- deb
- rpm
- archlinux
vendor: xvzc
homepage: https://github.com/xvzc/SpoofDPI
maintainer: xvzc
description: A simple and fast anti-censorship tool written in Go
license: Apache-2.0
bindir: /usr/local/bin
section: networking
priority: optional
# Generate Software Bill of Materials
sboms:
- artifacts: archive
checksum:
name_template: 'checksums.txt'
signs:
- cmd: cosign
signature: "${artifact}.sigstore.json"
artifacts: checksum
args:
- sign-blob
- "--bundle=${signature}"
- "${artifact}"
- --yes