From 11d2b135415c51644a92e0de5c4a8f83f838cd51 Mon Sep 17 00:00:00 2001 From: Shahid Raza Date: Sat, 9 May 2026 18:37:03 +0530 Subject: [PATCH] =?UTF-8?q?ci(release):=20align=20release.yml=20with=20cur?= =?UTF-8?q?rent=20CI=20=E2=80=94=20Go=201.25=20+=20Windows=20MSYS2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two issues that would block the next tag-triggered release: 1. Go 1.22 vs go.mod's 1.25 — the workflow was pinned to an older Go when v0.1.0 was cut. Bump both setup-go calls to 1.25. 2. Windows release builds had the same sqlite3.h-not-found problem we just fixed in ci.yml. Mirror the fix: msys2/setup-msys2 with the mingw-w64-x86_64 toolchain, run GoReleaser through `shell: msys2` so gcc finds /mingw64/include from its native shell context. Restructured the GoReleaser invocation: the action is used in `install-only: true` mode (just drops the binary), then we run `goreleaser release --split --clean` ourselves with the appropriate shell per OS. This gives Windows the msys2 shell without forking the action's invocation logic. Linux arm64 cross-compile setup (gcc-aarch64-linux-gnu) is unchanged — it was already correct and continues to work for the ubuntu-latest runner that builds both amd64 and arm64 Linux binaries. --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b31bbdd..45fd3c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,18 +29,46 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.25" cache: true - name: Install GCC (Linux arm64 cross-compiler) if: matrix.os == 'ubuntu-latest' run: sudo apt-get install -y gcc-aarch64-linux-gnu - - name: Run GoReleaser (split) + # Windows release builds need the same MSYS2 + sqlite3 toolchain as CI. + # GoReleaser is invoked via shell: msys2 so /mingw64/include is on + # gcc's default path when CGO compiles sqlite-vec. + - name: Set up MSYS2 (Windows) + if: matrix.os == 'windows-latest' + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + path-type: inherit + install: >- + mingw-w64-x86_64-gcc + mingw-w64-x86_64-sqlite3 + mingw-w64-x86_64-pkg-config + + - name: Install GoReleaser uses: goreleaser/goreleaser-action@v6 with: + install-only: true version: latest - args: release --split --clean + + - name: Run GoReleaser (Linux / macOS) + if: matrix.os != 'windows-latest' + run: goreleaser release --split --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CGO_ENABLED: 1 + GOOS: ${{ matrix.goos }} + + - name: Run GoReleaser (Windows) + if: matrix.os == 'windows-latest' + shell: msys2 {0} + run: goreleaser release --split --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CGO_ENABLED: 1 @@ -64,7 +92,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.25" - uses: actions/download-artifact@v4 with: