From 096971e313e1a8a32433213d3f2cb81b73d02b5e Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Mon, 27 Feb 2023 01:06:15 +0300 Subject: ci/cd: ship tarballs with vendored deps (#5403) --- .goreleaser.yml | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) (limited to '.goreleaser.yml') diff --git a/.goreleaser.yml b/.goreleaser.yml index 3f7f40d..93ea520 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 @@ -89,7 +93,8 @@ sboms: args: ["$artifact", "--file", "${document}", "--output", "cyclonedx-json"] archives: - - format_overrides: + - id: default + format_overrides: - goos: windows format: zip name_template: >- @@ -100,6 +105,42 @@ archives: {{- with .Arm }}v{{ . }}{{ end }} {{- with .Mips }}_{{ . }}{{ end }} {{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }} + + # packge the 'caddy-build' directory into a tarball, + # allowing users to build the exact same set of files as ours. + - id: source + meta: true + rlcp: 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' + + # This will make the destination paths be relative to the longest common + # path prefix between all the files matched and the source glob. + # Enabling this essentially mimic the behavior of nfpm's contents section. + # It will be the default by June 2023. + # + # Default: false + rlcp: true + + # Additional files/template/globs you want to add to the source archive. + # + # Default: empty. + files: + - vendor + checksum: algorithm: sha512 -- cgit v1.2.3 From a7db0cfe55b524a34a310e852af6c9520134db10 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Fri, 17 Mar 2023 19:36:59 +0300 Subject: ci: add `--yes` to cosign arguments (#5440) --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.goreleaser.yml') diff --git a/.goreleaser.yml b/.goreleaser.yml index 93ea520..8a980a1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -75,7 +75,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: -- cgit v1.2.3 From d8ae801068c1195f6f645a8b662fda6e81fd3621 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Fri, 30 Jun 2023 22:53:56 +0200 Subject: chore: remove deprecated property `rlcp` in goreleaser config (#5608) --- .goreleaser.yml | 9 --------- 1 file changed, 9 deletions(-) (limited to '.goreleaser.yml') diff --git a/.goreleaser.yml b/.goreleaser.yml index 8a980a1..f7d03e2 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -110,7 +110,6 @@ archives: # allowing users to build the exact same set of files as ours. - id: source meta: true - rlcp: true name_template: "{{ .ProjectName }}_{{ .Version }}_buildable-artifact" files: - src: LICENSE @@ -127,14 +126,6 @@ source: name_template: '{{ .ProjectName }}_{{ .Version }}_src' format: 'tar.gz' - # This will make the destination paths be relative to the longest common - # path prefix between all the files matched and the source glob. - # Enabling this essentially mimic the behavior of nfpm's contents section. - # It will be the default by June 2023. - # - # Default: false - rlcp: true - # Additional files/template/globs you want to add to the source archive. # # Default: empty. -- cgit v1.2.3 From fbb0ecfa322aa7710a3448453fd3ae40f037b8d1 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Tue, 8 Aug 2023 20:11:53 +0200 Subject: ci: Add riscv64 (64-bit RISC-V) to goreleaser (#5720) This will add 64-bit RISC-V Linux prebuilts for Caddy. --- .goreleaser.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.goreleaser.yml') diff --git a/.goreleaser.yml b/.goreleaser.yml index f7d03e2..53fdea0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -43,6 +43,7 @@ builds: - arm64 - s390x - ppc64le + - riscv64 goarm: - "5" - "6" @@ -54,14 +55,20 @@ 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" -- cgit v1.2.3 From 568fd2b28618552d6d613bc15e423251cc14e93c Mon Sep 17 00:00:00 2001 From: guangwu Date: Fri, 18 Aug 2023 22:20:46 +0800 Subject: fix package typo (#5764) Signed-off-by: guoguangwu --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.goreleaser.yml') diff --git a/.goreleaser.yml b/.goreleaser.yml index 53fdea0..dfd6589 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -113,7 +113,7 @@ archives: {{- with .Mips }}_{{ . }}{{ end }} {{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }} - # packge the 'caddy-build' directory into a tarball, + # package the 'caddy-build' directory into a tarball, # allowing users to build the exact same set of files as ours. - id: source meta: true -- cgit v1.2.3