Skip to content

Desktop: the app updates itself on Windows (D38) #96

Desktop: the app updates itself on Windows (D38)

Desktop: the app updates itself on Windows (D38) #96

Workflow file for this run

# Builds the desktop app on each system it ships for (D24, D25). fil's own CI
# stays cgo-free; this is the one place that needs a C toolchain.
name: desktop
# A change only to the website (site/) does not start it.
on:
push:
branches: [main]
paths-ignore:
- "site/**"
- ".github/workflows/pages.yml"
pull_request:
paths-ignore:
- "site/**"
- ".github/workflows/pages.yml"
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-24.04]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: desktop
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: desktop/go.mod
cache-dependency-path: desktop/go.sum
- name: Linux libraries
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
- name: Build
run: |
tags="desktop,production"
ldflags="-s -w"
cgo=1
case "$RUNNER_OS" in
Windows) cgo=0; ldflags="$ldflags -H windowsgui" ;;
Linux) tags="$tags,webkit2_41" ;;
# Wails v2 does not link UniformTypeIdentifiers, which the Xcode 26 SDK needs.
macOS) export CGO_LDFLAGS="-framework UniformTypeIdentifiers" ;;
esac
CGO_ENABLED=$cgo go build -tags "$tags" -ldflags "$ldflags" -o Filiation .
ls -l Filiation*
# The Windows installer, kept as a download on each run so it can be
# tried before a release (D37).
- name: Windows installer
if: runner.os == 'Windows'
shell: pwsh
working-directory: .
run: pwsh desktop/installer/build.ps1 -Version "0.0.0-dev.$("${{ github.sha }}".Substring(0, 7))"
- name: Keep the installer
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: desktop/installer/Output/*.exe
retention-days: 14