Skip to content

fix: MSYS2 .dll.a → .a symlinks so Zig linker finds GTK4/SQLite3 #6

fix: MSYS2 .dll.a → .a symlinks so Zig linker finds GTK4/SQLite3

fix: MSYS2 .dll.a → .a symlinks so Zig linker finds GTK4/SQLite3 #6

Workflow file for this run

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: bash ci/fix-msys2-libs.sh && 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