name: Build Windows on: [push] jobs: build-windows: runs-on: windows-latest defaults: run: shell: msys2 {0} steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version: '1.21' cache: false - name: Setup MSYS2 uses: msys2/setup-msys2@v2 with: msystem: MINGW64 path-type: inherit update: true install: >- mingw-w64-x86_64-gcc mingw-w64-x86_64-opus mingw-w64-x86_64-opusfile mingw-w64-x86_64-portaudio mingw-w64-x86_64-pkgconf - name: Build TUI run: | # Ensure Go can find the C libraries via pkg-config export CGO_ENABLED=1 go build -o dist/tui_windows.exe ./cmd/tui # Copy necessary DLLs for portability cp /mingw64/bin/libogg-0.dll dist/ cp /mingw64/bin/libopus-0.dll dist/ cp /mingw64/bin/libopusfile-0.dll dist/ cp /mingw64/bin/libportaudio-2.dll dist/ || true - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: tui-windows-binary path: dist/