From dd6bcc4301614cbcc9838ec52094cc75e1935328 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:22:39 +0100 Subject: [PATCH] fix(ci-cd): Add .exe suffix for Windows releases --- .github/workflows/release.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 91323fb..ac6b7c2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,7 +59,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_CONFIGLSP_TOKEN }} build-extension: - name: Build extension for ${{ matrix.target }} + name: Build extension for ${{ matrix.action_name }} runs-on: ubuntu-latest needs: # Wait for server to build so that we know the checks have passed @@ -71,23 +71,29 @@ jobs: - goos: linux goarch: amd64 vscode_target: linux-x64 + action_name: Linux x64 - goos: linux goarch: arm64 vscode_target: linux-arm64 + action_name: Linux ARM - goos: darwin goarch: amd64 vscode_target: darwin-x64 + action_name: macOS x64 - goos: darwin goarch: arm64 vscode_target: darwin-arm64 + action_name: macOS ARM - goos: windows goarch: amd64 vscode_target: win32-x64 + action_name: Windows x64 - goos: windows goarch: arm64 vscode_target: win32-arm64 + action_name: Windows ARM steps: - name: Checkout @@ -108,13 +114,21 @@ jobs: run: nix build .#"vs-code-extension-bare" - name: Build extension + if: ${{ matrix.goos != 'windows' }} run: cd server && GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -a -gcflags=all="-l -B" -ldflags="-s -w" -o config-lsp + - name: Build extension + if: ${{ matrix.goos == 'windows' }} + run: cd server && GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -a -gcflags=all="-l -B" -ldflags="-s -w" -o config-lsp.exe - name: Prepare folder run: cp -rL result dist && chmod -R 777 dist - name: Move binary to extension + if: ${{ matrix.goos != 'windows' }} run: mv server/config-lsp dist/out/ + - name: Move binary to extension + if: ${{ matrix.goos == 'windows' }} + run: mv server/config-lsp.exe dist/out/ - name: Shrink binary if: ${{ matrix.goos == 'linux' }}