Skip to content

ci: simplify build_and_release.yml workflow - #62

Open
markmybytes wants to merge 8 commits into
mainfrom
ci/workflow-fixes
Open

ci: simplify build_and_release.yml workflow#62
markmybytes wants to merge 8 commits into
mainfrom
ci/workflow-fixes

Conversation

@markmybytes

Copy link
Copy Markdown
Owner

Summary

Workflow simplifications and fixes for build_and_release.yml:

Bug fix

  • GOARCH was never set under pwsh default shell. The old set GOARCH=${{ matrix.goarch }} (cmd.exe syntax) silently no-op'd in PowerShell. Replaced with step-level env: so Go actually receives the target arch.
  • This bug masked the fact that 386 builds never worked — modernc.org/sqlite does not support windows/386. Past releases shipped x86 binaries that were actually amd64.

Simplifications

  • Dropped redundant shell: pwsh annotations (default on windows-latest)
  • Converted PCI download step to pwsh-native commands
  • Merged PCI + PawnIO downloads into one step
  • Compressed Move-Item calls into one comma-separated array
  • Dropped dead 'Install UPX' step from build job
  • Replaced inline cd / Set-Location with step-level working-directory
  • Extracted matrix build-name and wv2arch to job-level env expressions
  • Extracted WV2_VERSION to job env (was duplicated in URL)

Architecture change

  • Removed 32-bit Windows from both build matrices (build + build-updater)
  • Removed matrix strategy entirely (single-arch, no longer needed)

Result

  • File: 170 -> 147 lines (-23, -14%)
  • One less arch per release artifact (no x86 variants)
  • All future 386-related failures eliminated

Commits

8 commits stacked on ci/workflow-fixes:

  • 8cf3ad4 set GOARCH via step env (bug fix)
  • 6824d0a merge internal data downloads + compress Move-Item
  • 7700aef drop dead UPX step
  • d4111b3 use step working-directory
  • 9c65c29 derive matrix from job env
  • 94bc922 extract WV2_VERSION + drop blank line
  • 70f6c9f drop 32-bit Windows builds
  • 22ffcc8 remove unnecessary matrix

Notes

  • v5.6.2-beta.2 tag failed due to workflow syntax error after 32-bit drop; tag deleted and will be re-created pointing to latest commit.

- Replace silent-no-op 'set GOARCH=...' (cmd syntax, no effect under
  pwsh default shell) with step-level env: so Go picks up the target
  arch in any shell
- Drop redundant 'shell: pwsh' annotations (already default on
  windows-latest runners)
- Convert PCI download step to pwsh-native commands (Set-Location,
  New-Item, Invoke-WebRequest) for consistency with other steps
- Combine PCI ID and PawnIO downloads into single 'Download internal
  data files' pwsh step
- Unify on Invoke-WebRequest for all data downloads
- Collapse two Move-Item calls into one comma-separated array call
  (Move-Item accepts string[] Path + single Destination)
Per commit 935dfa1, UPX was disabled during Windows binary build.
The 'Install UPX' step is no longer used by wails build. Kept in
build-updater where PyInstaller may still benefit from compression.
Replace 'cd frontend', 'Set-Location build\\bin' and 'cd build\\bin'
with step-level 'working-directory'. Keeps run blocks focused on the
task rather than path manipulation.
The matrix include blocks for build and build-updater were pure
mappings (goarch/architecture -> build-name, wv2arch). Replace with
env expressions at job level. Mapping logic stays single-sourced
instead of duplicated across include and usage sites.
- Single source of truth for WebView2 version (was duplicated in
  path and query parameter)
- Drop stray double blank line between Node setup and npm install
modernc.org/sqlite does not support windows/386 (only windows/amd64
and windows/arm64 are documented). The previous matrix 386 entry
silently produced amd64 binaries under pwsh due to a no-op 'set
GOARCH='. With env-based GOARCH now actually applied, the 386
build fails to compile.

Drop goarch: '386' and architecture: x86 from both matrices. With
single-arch builds the env derivations collapse to constants.
With goarch/architecture pinned to a single value, the matrix adds
no parallelism and creates invalid YAML syntax (bare 'amd64'/'x64'
instead of arrays). Drop both strategy.matrix blocks and inline
the values where referenced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant