diff --git a/.ai/contexts/build-release.md b/.ai/contexts/build-release.md index 280fe4a98..6e99738d4 100644 --- a/.ai/contexts/build-release.md +++ b/.ai/contexts/build-release.md @@ -37,8 +37,20 @@ in its API path; draft creation and every upload attempt pass `--repo "${GITHUB_REPOSITORY}"`, so a clone's gh default cannot redirect writes. The script tests execute Bash with a fake gh boundary and cover repository selection, missing configuration, draft guards and upload retries. Manual -recovery downloads the tag run's artifacts, keeps the x64 copy of the colliding -pacman filename, then uses this script; see the release guide for commands. +recovery downloads the tag run's artifacts, keeps both architecture-specific +pacman packages, then uses this script; see the release guide for commands. + +The pacman `artifactName` in `package.json` includes `${arch}` so publish's +`merge-multiple: true` cannot overwrite one Linux package with the other. +electron-builder's pacman artifact macro expands to `x64` and `aarch64` +(the latter is the arm64 job), producing `switchboard-doctly--x64.pacman` +and `switchboard-doctly--aarch64.pacman`. The package name remains +`switchboard-doctly`. A full release now has 20 assets, including both pacman +packages; each Linux update manifest must reference its own package and hash. +`test/build-workflow.test.js` loads the real package configuration and builder +macro helpers to check that both matrix entries retain distinct filenames. +This guard does not build packages or generate manifests; verify those in the +tag build before publishing. Windows stays pinned to `windows-2022`: the Server 2025 image behind `windows-latest` lacks the Visual Studio C++ toolchain needed by node-gyp for diff --git a/.claude/commands/release.md b/.claude/commands/release.md index f2bfb4a77..825851f1f 100644 --- a/.claude/commands/release.md +++ b/.claude/commands/release.md @@ -30,7 +30,7 @@ Perform a release for this project, following [docs/releasing.md](../../docs/rel ``` Pushing the tag starts `.github/workflows/build.yml`. 7. Watch the build: `gh run list --repo devsuitup/switchboard --workflow build.yml --limit 1`, then `gh run watch --repo devsuitup/switchboard`. Its publish job creates a draft release, uploads the assets, and writes the release notes: the tag's `CHANGELOG.md` section, then a full-changelog compare link. It fails if that section is missing or empty. -8. Check that all 19 assets are on the draft (`gh release view v{version} --repo devsuitup/switchboard --json assets --jq '.assets | length'`); upload any missing one with `gh release upload v{version} --clobber --repo devsuitup/switchboard`. +8. Check that all 20 assets are on the draft (11 when macOS was not built) (`gh release view v{version} --repo devsuitup/switchboard --json assets --jq '.assets | length'`), including both `switchboard-doctly-{version}-x64.pacman` and `switchboard-doctly-{version}-aarch64.pacman`; verify that each Linux update manifest references its own package with matching size and hash. Upload any missing asset with `gh release upload v{version} --clobber --repo devsuitup/switchboard`. 9. Keep the notes the workflow wrote: they are the changelog section the installed apps show in their What's new dialog, and the two must say the same thing. Check the body (`gh release view v{version} --repo devsuitup/switchboard --json body --jq .body`); a wording to change is changed in `CHANGELOG.md`, through a PR. If the notes step failed, add the missing section through a PR, then fill in the draft by hand: `node scripts/changelog-section.js v{version} > notes.md` on the merged `main`, and `gh release edit v{version} --repo devsuitup/switchboard --notes-file notes.md`. 10. Publish the draft to beta: `gh release edit v{version} --repo devsuitup/switchboard --draft=false --prerelease`. One binary serves both channels; beta is the GitHub pre-release flag. Keep the same version tag and assets, with no beta tags or rebuild. 11. **Promote to stable**, only on the maintainer's go, after at least 24 hours of use on beta and with no open issue labelled `regression` for that version. List the open regressions (`gh issue list --repo devsuitup/switchboard --state open --label regression --limit 1000`), inspect which version each affects, then run `gh release edit v{version} --repo devsuitup/switchboard --prerelease=false --latest`. diff --git a/CHANGELOG.md b/CHANGELOG.md index bb879e208..1e37afc44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ What changes for you in each release of Switchboard. How to write an entry: [doc ## Unreleased +### Fixed +- Arch/Manjaro downloads now include a separate package for each architecture, so x64 users no longer sometimes receive an ARM package. (#1089) + ## v0.0.105 — 2026-11-11 ### New diff --git a/README.md b/README.md index 30c8b9e64..18a83b597 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ fit. `git log --oneline upstream/main..main` lists what the fork carries. |---|---| | macOS | `.dmg` or `.zip`, Apple Silicon (`arm64`) and Intel (`x64`) | | Windows | `Switchboard-Setup-.exe` (NSIS installer, x64 and arm64) | -| Linux | `.AppImage` (x64, arm64), `.deb` (amd64, arm64), `switchboard-doctly-.pacman` | +| Linux | `.AppImage` (x64, arm64), `.deb` (amd64, arm64), `switchboard-doctly--x64.pacman` or `-aarch64.pacman` | The builds are not code-signed. macOS Gatekeeper and Windows SmartScreen warn on first launch. diff --git a/docs/releasing.md b/docs/releasing.md index eda074228..4a4a240cd 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -80,10 +80,11 @@ gh's default here is the upstream repository, `doctly/switchboard`. The download directory must not exist yet. Merge its `dist-*` artifact directories into one fresh directory containing only the assets to upload. - Both Linux jobs produce `switchboard-doctly-.pacman` with the same - filename: keep the copy from `dist-linux-x64` and discard the arm64 copy. - (CI merges the artifacts with `merge-multiple`, so which copy CI publishes - depends on download order: v0.0.104 shipped the aarch64 copy.) If macOS + Keep both Linux pacman packages: `switchboard-doctly--x64.pacman` + from `dist-linux-x64` and `switchboard-doctly--aarch64.pacman` from + `dist-linux-arm64`. Their distinct names let both coexist in the merged + directory. Verify that `latest-linux.yml` and `latest-linux-arm64.yml` + reference their respective packages with matching sizes and hashes. If macOS artifacts are absent, omit `latest-mac.yml`. Never copy a previous release's mac manifest: upload it only when its version, filenames, sizes and hashes match the macOS files actually attached to this release. @@ -112,10 +113,10 @@ gh's default here is the upstream repository, `doctly/switchboard`. After all builds succeed, the publish job: - creates a **draft** release named after the version; - - uploads each artifact separately, retrying each up to five times — 19 + - uploads each artifact separately, retrying each up to five times — 20 assets for a full build (dmg, zip and their blockmaps for arm64 and x64; the - Windows installer and its blockmap; two AppImages, two debs, one pacman - package; four `latest*.yml` update manifests); + Windows installer and its blockmap; two AppImages, two debs, two pacman + packages (`-x64.pacman` and `-aarch64.pacman`); four `latest*.yml` update manifests); - writes the release notes: the text of the tag's `CHANGELOG.md` section, without its heading (`scripts/changelog-section.js`), then a **Full changelog** link comparing the previous tag with this one. It fails diff --git a/package.json b/package.json index 64de4b138..e41e0d46c 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ }, "pacman": { "packageName": "switchboard-doctly", - "artifactName": "switchboard-doctly-${version}.${ext}", + "artifactName": "switchboard-doctly-${version}-${arch}.${ext}", "depends": [ "gtk3", "nss", diff --git a/test/build-workflow.test.js b/test/build-workflow.test.js index 517bffe66..ef89e9af4 100644 --- a/test/build-workflow.test.js +++ b/test/build-workflow.test.js @@ -29,6 +29,25 @@ function matrixFor(eventName, ref) { return evaluate(workflow.jobs.build.strategy.matrix.include, eventName, ref); } +test('Linux pacman artifacts keep distinct architecture names when release downloads merge', () => { + const { build, version } = require('../package.json'); + const { expandMacro } = require('app-builder-lib/out/util/macroExpander'); + const { Arch, getArtifactArchName } = require('builder-util/out/arch'); + const names = matrixFor('push').filter(({ platform }) => platform === 'linux').map(({ arch }) => + expandMacro(build.pacman.artifactName, getArtifactArchName(Arch[arch], 'pacman'), { version }, { ext: 'pacman' })); + assert.equal(new Set(names).size, 2, 'merged release must retain both Linux pacman packages'); + assert.deepEqual(names, [ + `switchboard-doctly-${version}-x64.pacman`, + `switchboard-doctly-${version}-aarch64.pacman`, + ]); + assert.ok(build.linux.target.includes('pacman')); + assert.equal(build.pacman.packageName, 'switchboard-doctly'); + const upload = workflow.jobs.build.steps.find(step => step.uses?.startsWith('actions/upload-artifact@')); + assert.ok(upload.with.path.split(/\r?\n/).includes('dist/*.pacman')); + const download = workflow.jobs.publish.steps.find(step => step.uses?.startsWith('actions/download-artifact@')); + assert.equal(download.with['merge-multiple'], true); +}); + test('pull requests build exactly Windows and both Linux architectures', () => { assert.deepEqual(matrixFor('pull_request'), nonMac); });