name: CI on: push: branches: [main] pull_request: branches: [main] jobs: verify: runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - uses: pnpm/action-setup@v4 with: version: 10 - uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm cache-dependency-path: frontend/pnpm-lock.yaml - name: Verify CHANGELOG.md matches current version shell: pwsh run: | $ErrorActionPreference = 'Stop' $verFile = Get-Content -Raw -LiteralPath 'internal/version/version.go' if ($verFile -notmatch 'var\s+Version\s*=\s*"(v[^"]+)"') { throw 'Could not parse Version from internal/version/version.go' } $ver = $Matches[1] $tmp = Join-Path $env:RUNNER_TEMP "release-notes-$ver.md" & ./scripts/build-release-notes.ps1 -Tag $ver -OutFile $tmp Write-Host "PASS CHANGELOG.md contains valid release notes for $ver ($((Get-Item -LiteralPath $tmp).Length) bytes)" - name: Frontend test & build shell: pwsh run: | pnpm --dir frontend install --frozen-lockfile pnpm --dir frontend test pnpm --dir frontend build - name: Debug workspace hygiene check & self-test shell: pwsh run: | node scripts/debug/check.mjs node --test scripts/debug/debug.test.mjs - name: Go test & vet shell: pwsh run: | go test ./... go vet ./... - name: Build reims-go.exe (window + command-line mode) shell: pwsh run: | New-Item -ItemType Directory -Force -Path build/bin | Out-Null go build -trimpath -tags desktop,production -ldflags "-H windowsgui" -o build/bin/reims-go.exe . # Command-line mode must still answer through a pipe from the GUI-subsystem build. $out = & build/bin/reims-go.exe version | Out-String if ($LASTEXITCODE -ne 0 -or $out -notmatch '^reims-go ') { throw "reims-go.exe version failed: $out" }