Skip to content

Commit 69fb485

Browse files
committed
feat(ci): expand build matrix — multi-arch for all platforms
Matrix now covers 8 targets across 3 platforms: macOS (macos-latest): - universal (arm64 + x86_64 fat binary) - aarch64 (Apple Silicon standalone) - x86_64 (Intel standalone) Linux: - amd64 / x86_64 (ubuntu-latest) - arm64 / aarch64 (ubuntu-24.04-arm native runner) Windows (windows-latest, NSIS only): - x64 - x86 (32-bit, cross-compiled via i686-pc-windows-msvc) - arm64 (cross-compiled via aarch64-pc-windows-msvc) Rename step generalised to handle any arch suffix in: - .app.tar.gz / .app.tar.gz.sig (macOS, no version in original name) - .rpm (custom format with release number) Version bumped to 5.0.0-beta.9 for CI validation.
1 parent 425d988 commit 69fb485

5 files changed

Lines changed: 29 additions & 16 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,33 @@ jobs:
6060
fail-fast: false
6161
matrix:
6262
include:
63-
# macOS universal binary (arm64 + x86_64 fat binary)
63+
# ── macOS ──────────────────────────────────────────────
6464
- platform: macos-latest
6565
args: --target universal-apple-darwin
6666
rust_targets: aarch64-apple-darwin,x86_64-apple-darwin
67-
# Linux x64
67+
- platform: macos-latest
68+
args: --target aarch64-apple-darwin
69+
rust_targets: aarch64-apple-darwin
70+
- platform: macos-latest
71+
args: --target x86_64-apple-darwin
72+
rust_targets: x86_64-apple-darwin
73+
# ── Linux ──────────────────────────────────────────────
6874
- platform: ubuntu-latest
6975
args: ''
7076
rust_targets: ''
71-
# Windows x64 — NSIS only; MSI requires numeric-only
72-
# pre-release identifiers (e.g. 5.0.0-7 ok, 5.0.0-beta.7 not)
73-
# which conflicts with semver conventions. NSIS is the standard
74-
# user-facing Windows installer; MSI can be added back for
75-
# stable releases if enterprise deployment needs it.
77+
- platform: ubuntu-24.04-arm
78+
args: ''
79+
rust_targets: ''
80+
# ── Windows (NSIS only — MSI rejects non-numeric pre-release) ──
7681
- platform: windows-latest
7782
args: --bundles nsis
7883
rust_targets: ''
84+
- platform: windows-latest
85+
args: --target i686-pc-windows-msvc --bundles nsis
86+
rust_targets: i686-pc-windows-msvc
87+
- platform: windows-latest
88+
args: --target aarch64-pc-windows-msvc --bundles nsis
89+
rust_targets: aarch64-pc-windows-msvc
7990

8091
runs-on: ${{ matrix.platform }}
8192

@@ -193,11 +204,13 @@ jobs:
193204
# 1. Main pattern: SwitchHosts_{ver}_{arch}… → SwitchHosts-{ver}-{platform}-{arch}…
194205
NEW=$(echo "$NEW" | sed "s|^SwitchHosts_${VERSION}_|SwitchHosts-${VERSION}-${PLATFORM}-|")
195206
196-
# 2. macOS .app.tar.gz has no version: SwitchHosts_universal… → insert version + platform
197-
NEW=$(echo "$NEW" | sed "s|^SwitchHosts_universal|SwitchHosts-${VERSION}-${PLATFORM}-universal|")
207+
# 2. Files without version (macOS .app.tar.gz): SwitchHosts_{arch}… → insert version + platform
208+
NEW=$(echo "$NEW" | sed "s|^SwitchHosts_\([a-zA-Z0-9_]*\)\.\(app\.tar\.gz\)|SwitchHosts-${VERSION}-${PLATFORM}-\1.\2|")
209+
# Also handle the .sig companion
210+
NEW=$(echo "$NEW" | sed "s|^SwitchHosts_\([a-zA-Z0-9_]*\)\.\(app\.tar\.gz\.sig\)|SwitchHosts-${VERSION}-${PLATFORM}-\1.\2|")
198211
199-
# 3. RPM uses its own format: SwitchHosts-{ver}-1.x86_64.rpm → normalise
200-
NEW=$(echo "$NEW" | sed "s|^SwitchHosts-${VERSION}-1\\.x86_64|SwitchHosts-${VERSION}-${PLATFORM}-x86_64|")
212+
# 3. RPM uses its own format: SwitchHosts-{ver}-1.{arch}.rpm → normalise
213+
NEW=$(echo "$NEW" | sed "s|^SwitchHosts-${VERSION}-1\.\([a-zA-Z0-9_]*\)\.rpm|SwitchHosts-${VERSION}-${PLATFORM}-\1.rpm|")
201214
202215
# 4. Drop _en-US from MSI name
203216
NEW=$(echo "$NEW" | sed "s|_en-US\\.msi|.msi|")

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "5.0.0-beta.8",
3+
"version": "5.0.0-beta.9",
44
"scripts": {
55
"start": "cross-env NODE_ENV=development electron ./build/main.js",
66
"pretest": "rimraf ./test/tmp",

‎src-tauri/tauri.conf.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "SwitchHosts",
4-
"version": "5.0.0-beta.8",
4+
"version": "5.0.0-beta.9",
55
"identifier": "net.oldj.switchhosts",
66
"build": {
77
"beforeDevCommand": "npm run dev:renderer",

‎src/version.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"5.0.0-beta.8"
1+
"5.0.0-beta.9"

0 commit comments

Comments
 (0)