fix: remove broken b.findProgram call, keep simple MSYS2 fallback paths #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| push: | |
| tags: ["20*.*.*"] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: UCRT64 | |
| update: true | |
| install: > | |
| mingw-w64-ucrt-x86_64-gtk4 | |
| mingw-w64-ucrt-x86_64-pkg-config | |
| mingw-w64-ucrt-x86_64-sqlite3 | |
| mingw-w64-ucrt-x86_64-curl | |
| mingw-w64-ucrt-x86_64-git | |
| mingw-w64-ucrt-x86_64-nsis | |
| - name: Install Zig | |
| shell: pwsh | |
| run: | | |
| $json = Invoke-RestMethod https://ziglang.org/download/index.json | |
| $url = $json.master."x86_64-windows".tarball | |
| $zip = "$env:TEMP\zig.zip" | |
| Invoke-WebRequest -Uri $url -OutFile $zip | |
| Expand-Archive $zip -DestinationPath "$env:USERPROFILE\zig" -Force | |
| $dir = (Get-ChildItem "$env:USERPROFILE\zig" -Recurse -Filter "zig.exe").DirectoryName | |
| echo "$dir" | Out-File $env:GITHUB_PATH -Append | |
| - name: Build | |
| shell: msys2 {0} | |
| env: | |
| MSYS2_PATH_TYPE: inherit | |
| run: zig build | |
| - name: Package | |
| shell: pwsh | |
| run: | | |
| $dist = "dist\Metanoia" | |
| New-Item $dist -ItemType Directory -Force | |
| Copy-Item "zig-out\bin\*" $dist -Recurse | |
| Copy-Item "assets\metanoia.ico" $dist | |
| $tag = "$env:GITHUB_REF_NAME" | |
| $date = $tag.Split("-")[0] | |
| Compress-Archive -Path "$dist\*" -DestinationPath "dist\Metanoia-$tag.zip" | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "${{ github.ref_name }}" | |
| body: "Portable Windows build — unzip and run metanoia.exe" | |
| files: dist/Metanoia-*.zip |