From bb533e35647b51e0b30de11714013dc1923e9182 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Thu, 21 Dec 2023 22:41:28 +0800 Subject: [PATCH 1/2] chore: add explicit build ID Despite the suggestion in the docs, the build ID does not default to the value of the "binary" field. --- .goreleaser.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e23507f..5dd64a5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,6 +1,7 @@ builds: -- main: ./cmd/go-cli-github +- id: go-cli-github binary: go-cli-github + main: ./cmd/go-cli-github ldflags: - > -s -w From a56335dfe22b105ea7580895066b191ad1a7f565 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Thu, 21 Dec 2023 22:47:12 +0800 Subject: [PATCH 2/2] fix: build workflow Coincidentally the repository matched the binary name, but it is the latter value that is correct for multi-binary repositories. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4e46ddf..30f8c68 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,4 +49,4 @@ jobs: labels: ${{ steps.docker_metadata.outputs.labels }} file: Dockerfile build-args: BINARY=${{ matrix.binary }} - context: dist/${{ env.GITHUB_REPOSITORY_NAME }}_linux_amd64_v1 + context: dist/${{ matrix.binary }}_linux_amd64_v1