From 4ac738e6e911c7a7316e92a67859fd62f40ebef2 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Tue, 1 Sep 2026 06:26:07 +0800 Subject: [PATCH] ci(windows): load MSVC dev environment before building rustc resolves link.exe via PATH for the windows-msvc target, but Git for Windows ships GNU coreutils' link.exe which shadows MSVC's linker, breaking every build-script link. Add ilammy/msvc-dev-cmd@v1 before the tauri build so PATH/LIB/INCLUDE point at the real MSVC toolchain (and it fails fast if MSVC is missing instead of at link time). --- .gitea/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a232f7c..cc6e3a9 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -212,6 +212,16 @@ jobs: cp "$WINROOT"/bin/mariadb-dump.exe "$WINROOT"/bin/mariadb.exe "$OUT"/ cp "$WINROOT"/lib/libmariadb.dll "$OUT"/ + # rustc resolves `link.exe` via PATH for the windows-msvc target, but Git + # for Windows ships GNU coreutils with its own `link.exe` that shadows + # MSVC's linker (`link: extra operand ...`). Load the MSVC dev + # environment so PATH/LIB/INCLUDE point at the real MSVC toolchain. + # Fails fast here (instead of at link time) if the toolchain is missing. + - name: Set up MSVC build environment + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + - name: Build installers shell: bash run: bun run --filter gridline-desktop tauri build