From 4b957a0106899666b55420b61d2bb12d08d82022 Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Thu, 25 Jun 2026 22:23:41 +0200 Subject: [PATCH] ci/cd: don't build unnecessary binaries for `next` image --- .goreleaser.yaml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 26f533d0..240aec9b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -60,11 +60,30 @@ builds: - -trimpath - -p=2 mod_timestamp: "{{ .CommitTimestamp }}" + skip: '{{ if index .Env "BUILD_NEXT" }}true{{ end }}' + + - id: pocket-id-next + main: ./cmd + dir: backend + binary: pocket-id + env: + - CGO_ENABLED=0 + - GOMAXPROCS=2 + targets: + - linux_amd64_v1 + - linux_arm64_v8.0 + ldflags: + - -w -s + - -buildid={{ .Version }} + - -X github.com/pocket-id/pocket-id/backend/internal/common.Version={{ .Version }} + flags: + - -trimpath + - -p=2 + mod_timestamp: "{{ .CommitTimestamp }}" + skip: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}' archives: - id: default - ids: - - pocket-id formats: - binary name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}" @@ -136,7 +155,7 @@ dockers_v2: - id: pocket-id-next ids: - - pocket-id + - pocket-id-next dockerfile: docker/Dockerfile-prebuilt images: - "pocketid/pocket-id" @@ -164,7 +183,7 @@ dockers_v2: - id: pocket-id-next-distroless ids: - - pocket-id + - pocket-id-next dockerfile: docker/Dockerfile-distroless images: - "pocketid/pocket-id" @@ -190,7 +209,7 @@ dockers_v2: notarize: macos: - - enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}' + - enabled: '{{ if and (isEnvSet "MACOS_SIGN_P12") (not (index .Env "BUILD_NEXT")) }}true{{ end }}' ids: - pocket-id sign: