summaryrefslogtreecommitdiff
path: root/.goreleaser.yml
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2023-11-01 17:57:48 +0100
committerTom Barrett <tom@tombarrett.xyz>2023-11-01 18:11:33 +0100
commit240c3d1338415e5d82ef7ca0e52c4284be6441bd (patch)
tree4b0ee5d208c2cdffa78d65f1b0abe0ec85f15652 /.goreleaser.yml
parent73e78ab226f21e6c6c68961af88c4ab9c746f4f4 (diff)
parent0e204b730aa2b1fa0835336b1117eff8c420f713 (diff)
vbump to v2.7.5HEADcaddy-cgi
Diffstat (limited to '.goreleaser.yml')
-rw-r--r--.goreleaser.yml45
1 files changed, 42 insertions, 3 deletions
diff --git a/.goreleaser.yml b/.goreleaser.yml
index 3f7f40d..dfd6589 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -4,7 +4,9 @@ before:
# This is so we can run goreleaser on tag without Git complaining of being dirty. The main.go in cmd/caddy directory
# cannot be built within that directory due to changes necessary for the build causing Git to be dirty, which
# subsequently causes gorleaser to refuse running.
- - rm -rf caddy-build caddy-dist
+ - rm -rf caddy-build caddy-dist vendor
+ # vendor Caddy deps
+ - go mod vendor
- mkdir -p caddy-build
- cp cmd/caddy/main.go caddy-build/main.go
- /bin/sh -c 'cd ./caddy-build && go mod init caddy'
@@ -14,6 +16,8 @@ before:
# as of Go 1.16, `go` commands no longer automatically change go.{mod,sum}. We now have to explicitly
# run `go mod tidy`. The `/bin/sh -c '...'` is because goreleaser can't find cd in PATH without shell invocation.
- /bin/sh -c 'cd ./caddy-build && go mod tidy'
+ # vendor the deps of the prepared to-build module
+ - /bin/sh -c 'cd ./caddy-build && go mod vendor'
- git clone --depth 1 https://github.com/caddyserver/dist caddy-dist
- mkdir -p caddy-dist/man
- go mod download
@@ -39,6 +43,7 @@ builds:
- arm64
- s390x
- ppc64le
+ - riscv64
goarm:
- "5"
- "6"
@@ -50,15 +55,21 @@ builds:
goarch: ppc64le
- goos: darwin
goarch: s390x
+ - goos: darwin
+ goarch: riscv64
- goos: windows
goarch: ppc64le
- goos: windows
goarch: s390x
+ - goos: windows
+ goarch: riscv64
- goos: freebsd
goarch: ppc64le
- goos: freebsd
goarch: s390x
- goos: freebsd
+ goarch: riscv64
+ - goos: freebsd
goarch: arm
goarm: "5"
flags:
@@ -71,7 +82,7 @@ signs:
- cmd: cosign
signature: "${artifact}.sig"
certificate: '{{ trimsuffix (trimsuffix .Env.artifact ".zip") ".tar.gz" }}.pem'
- args: ["sign-blob", "--output-signature=${signature}", "--output-certificate", "${certificate}", "${artifact}"]
+ args: ["sign-blob", "--yes", "--output-signature=${signature}", "--output-certificate", "${certificate}", "${artifact}"]
artifacts: all
sboms:
@@ -89,7 +100,8 @@ sboms:
args: ["$artifact", "--file", "${document}", "--output", "cyclonedx-json"]
archives:
- - format_overrides:
+ - id: default
+ format_overrides:
- goos: windows
format: zip
name_template: >-
@@ -100,6 +112,33 @@ archives:
{{- with .Arm }}v{{ . }}{{ end }}
{{- with .Mips }}_{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
+
+ # package the 'caddy-build' directory into a tarball,
+ # allowing users to build the exact same set of files as ours.
+ - id: source
+ meta: true
+ name_template: "{{ .ProjectName }}_{{ .Version }}_buildable-artifact"
+ files:
+ - src: LICENSE
+ dst: ./LICENSE
+ - src: README.md
+ dst: ./README.md
+ - src: AUTHORS
+ dst: ./AUTHORS
+ - src: ./caddy-build
+ dst: ./
+
+source:
+ enabled: true
+ name_template: '{{ .ProjectName }}_{{ .Version }}_src'
+ format: 'tar.gz'
+
+ # Additional files/template/globs you want to add to the source archive.
+ #
+ # Default: empty.
+ files:
+ - vendor
+
checksum:
algorithm: sha512