From f34727d572c5ed25aee20d5f9a6a3240f2b0c7c0 Mon Sep 17 00:00:00 2001 From: acud <12988138+acud@users.noreply.github.com> Date: Wed, 27 May 2026 12:21:02 -0600 Subject: [PATCH 1/2] ci: update goreleaser --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d100446245e..8653a333da5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,7 @@ jobs: run: | echo "BEE_API_VERSION=$(grep '^ version:' openapi/Swarm.yaml | awk '{print $2}')" >> $GITHUB_ENV - name: Run GoReleaser - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6 + uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2 with: version: '~> v2' args: release --clean --timeout 1h From 77ebd8f938e86a45b1586e0ca8814ca5e808d850 Mon Sep 17 00:00:00 2001 From: acud <12988138+acud@users.noreply.github.com> Date: Wed, 27 May 2026 12:29:11 -0600 Subject: [PATCH 2/2] chore: add caching --- .github/workflows/release.yaml | 13 +++++++++++++ .goreleaser.yml | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8653a333da5..b486261a0fa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,20 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: + cache: false go-version-file: go.mod + - name: Cache Go modules and build cache + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-release-${{ hashFiles('**/go.sum') }} + # Cross-compilation recompiles deps per architecture; seed from the + # most recent build cache so each release is incremental, not cold. + restore-keys: | + ${{ runner.os }}-go-release- + ${{ runner.os }}-go- - name: Docker Hub and Quay Login run: | printf ${{ secrets.DOCKERHUB_PASSWORD }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin diff --git a/.goreleaser.yml b/.goreleaser.yml index 78066917a98..e0644105981 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,6 +2,12 @@ project_name: bee version: 2 +before: + hooks: + # Prime the module cache once up front so cross-compilation targets do not + # each trigger their own dependency download. + - go mod download + release: prerelease: auto