Repository navigation
Expand file tree
/
Copy path.goreleaser.yml
More file actions
140 lines (126 loc) · 3.38 KB
/
Copy path.goreleaser.yml
File metadata and controls
140 lines (126 loc) · 3.38 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
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
version: 2
dist: bin
before:
hooks:
- task build:fe
builds:
- binary: semaphore
env:
- CGO_ENABLED=0
main: ./cli/main.go
ldflags: -s -w -X github.com/semaphoreui/semaphore/util.Ver={{ .Version }} -X github.com/semaphoreui/semaphore/util.Commit={{ .ShortCommit }} -X github.com/semaphoreui/semaphore/util.Date={{ .Timestamp }}
tags:
- netgo
goos:
- windows
- darwin
- linux
- freebsd
goarch:
- 386
- amd64
- arm
- arm64
- ppc64le
ignore:
- goos: freebsd
goarch: arm
- goos: freebsd
goarch: 386
- goos: freebsd
goarch: ppc64le
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: ppc64le
- goos: windows
goarch: arm
archives:
- files:
- LICENSE
name_template: "{{ .Env.PROJECT_NAME }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
# CycloneDX SBOM for every release binary (community and Pro builds alike).
# cyclonedx-gomod runs from the dist dir, so the module root is "../".
# GOOS/GOARCH/GOFLAGS must match the build so the dependency graph is the
# one actually linked into that binary.
sboms:
- id: binary
artifacts: binary
documents:
- "{{ .Env.PROJECT_NAME }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.cdx.json"
cmd: cyclonedx-gomod
args:
- app
- -main
- cli
- -licenses
- -json
- -output
- $document
- ../
env:
- GOOS={{ .Os }}
- GOARCH={{ .Arch }}
- GOFLAGS=-tags=netgo
- CGO_ENABLED=0
# goreleaser gives the SBOM command a fresh environment, so GOWORK must be
# forwarded explicitly or a local GOWORK=off (community) build would get a
# Pro dependency graph when go.work is present.
- GOWORK={{ envOrDefault "GOWORK" "" }}
signs:
-
artifacts: checksum
signature: "{{ .Env.PROJECT_NAME }}_{{ .Version }}_checksums.txt.sig"
cmd: gpg
stdin: '{{ .Env.GPG_PASS_3 }}'
args:
- "--batch"
- "--pinentry-mode"
- "loopback"
- "--passphrase-fd"
- "0"
- "-u"
- "{{ .Env.GPG_KEY_ID_3 }}"
- "--yes"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
checksum:
name_template: "{{ .Env.PROJECT_NAME }}_{{ .Version }}_checksums.txt"
snapshot:
name_template: "{{ .Timestamp }}-{{ .ShortCommit }}-SNAPSHOT"
nfpms:
- id: semaphore
file_name_template: "{{ .Env.PROJECT_NAME }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
package_name: "semaphore"
description: Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools.
homepage: https://github.com/semaphoreui/semaphore
vendor: Semaphore UI
maintainer: Denis Gukov <denis@semaphoreui.com>
license: MIT
formats:
- deb
- rpm
dependencies:
- git
suggests:
- ansible
bindir: /usr/bin
# Embedded RPM signature (rpm -K). Skipped when GPG_KEY_PATH is not set
# (e.g. local `task release:test`). Passphrase comes from the
# NFPM_SEMAPHORE_PASSPHRASE environment variable.
rpm:
signature:
key_file: '{{ envOrDefault "GPG_KEY_PATH" "" }}'
release:
draft: true
use_existing_draft: true
name_template: "{{.Tag}}"