Each release is a complete Apple Silicon DMG with the launcher, its licenses, and an Applications shortcut. It does not contain a runtime or Arknights game files. On first use, the launcher asks for an architecture and downloads the pinned runtime for that architecture. runtime.json pins one runtime archive per lane. Runtime updates describes how to change a pin.
Creating a release#
Check these inputs first:
| Input | Required state |
|---|---|
CHANGELOG.md |
Non-empty ## [X.Y.Z] section; it becomes the GitHub and Sparkle release notes |
Resources/Info.plist |
CFBundleShortVersionString exactly matches X.Y.Z; SUPublicEDKey stays the tracked release public key |
runtime.json |
Schema 4 with lanes.x86 and lanes.arm; each lane has a runtime name and version, an HTTPS URL, lowercase SHA-256, byte size, pinned deltas, minimumMacOS, lane prefixRevision, interface, components, and provenance |
Working tree and main |
Clean, on main, equal to upstream. just release checks all three |
A release can be critical. Set the critical input when you start Draft release from GitHub Actions; just release does not pass it. Use it only for an urgent fix that users must install now. The update window then has no Later button, and Cancel remains while the update downloads. Launcher builds from this release onward honor the flag; older builds ignore it.
Draft release has a channel input, stable by default. Choose canary for a release candidate: enter X.Y.Z-rc.N as the version, or run just release X.Y.Z-rc.1 0 canary. The changelog section and CFBundleShortVersionString still use X.Y.Z. Only a canary release accepts the -rc.N suffix. A canary release is a draft prerelease on the Sparkle canary channel.
The package job works in this order. It validates the branch, version, CHANGELOG.md, and Info.plist. It runs just ci. It extracts the changelog section as release notes. It builds the arm64 app and DMG. It creates the signed update archive and appcast, writes SHA256SUMS, and creates the draft vX.Y.Z release. It publishes no runtime binary. It never changes the live feed.
This diagram shows the same order:
flowchart LR
Check["Validate branch, version,<br/>CHANGELOG, and Info.plist"] --> Test[just ci]
Test --> Notes["Extract the CHANGELOG<br/>section as release notes"]
Notes --> Build[Build arm64 app and DMG]
Build --> Archive["Create .tar.xz update archive<br/>and signed appcast"]
Archive --> Sums[Write SHA256SUMS]
Sums --> Draft["Create a draft<br/>vX.Y.Z release"]Canary releases and promotion#
Ship a launcher change in two steps. First draft and publish a canary release. Users who chose Update channel → Canary receive it. After a 2-3 day soak, promote the same build to stable. If you need another candidate, publish X.Y.Z-rc.2, and finish with a final stable release.
To promote, start Promote canary release from GitHub Actions on main and enter the tag, for example v1.0.3-rc.2. The workflow fails unless the tag is a published prerelease whose feed item is on the canary channel. It removes sparkle:channel from that item only, signs the feed, and uploads it. It also attaches the stable-only appcast.xml, marks the release latest, and redeploys the site. It rebuilds nothing, so the stable build is the exact build that users tested.
Keep one release in flight at a time. Publish or delete a draft before you draft another release or promote one. Publishing fails when the feed changed after the draft was built. Then delete the draft and run Draft release again.
just stats shows DMG and Sparkle archive download counts, separated into manual packages and in-app updates. GitHub counts downloads, not unique users. Treat the totals as directional.
Local packaging#
Run just dev to build the app. Run just dev dmg to continue to the installable DMG. The app bundle contains no runtime, so the build does not need a local runtime directory.
To inspect the license list with a prepared runtime, download one lane with uv run --locked scripts/download_runtime.py --architecture x86 or --architecture arm. The script verifies the SHA-256 and size, extracts the archive safely, validates the lane interface, and writes .build/runtime-x86 or .build/runtime-arm.
Packaging compiles the Swift launcher, the universal macOS shims in RuntimeSupport, and its x86-64 Windows libraries. It writes one compact ThirdPartyNotices.deflate file with the launcher notices into the app. Each runtime archive carries its own notices. See License automation.
The draft contains:
| Asset | Purpose |
|---|---|
| DMG | Installable arm64 application |
.tar.xz update archive |
Complete Sparkle update archive (0.6.x: .zip) |
*.delta |
Sparkle binary deltas from recent releases |
appcast.xml |
Signed Sparkle feed with embedded release notes |
SHA256SUMS |
SHA-256 checksums for the published artifacts |
The workflow attaches GitHub build-provenance attestations to the DMG, the .tar.xz update archive, the deltas, appcast.xml, and the checksum file. Do not copy assets from dist/ into the repository.
To test the release path without publishing, start Draft release from any branch with dry_run enabled. The run builds, signs, and verifies everything, including the Sparkle deltas. It skips the website deploy, the attestation, and the draft release. It uploads the files as the dry-run-vX.Y.Z workflow artifact, which expires after three days. Inspect that artifact before a real release.
GitHub Actions dependencies use immutable commit pins with version comments. Every workflow declares bounded job runtimes and job-specific token permissions. Write access is limited to draft release creation, Pages deployment, live-contract failure issues, and the wallpaper-tag scan. The scan opens pull requests, dispatches CI for them, and files issues.
Release review#
- The source tag matches
CFBundleShortVersionStringand the release notes. Contents/Resources/RUNTIME.jsonin the app matches theruntime.jsonthat the build used. It contains both lane pins.Contents/Resources/Runtimeis absent. The app bundle contains no runtime binary.- Each lane in
runtime.jsonhas a reachable HTTPS archive URL, a matching SHA-256, a byte size, aminimumMacOSvalue, and an interface. The archive at each URL carriesbin/wine64,bin/wineserver,winemetal.dllwhere its lane requires it, the macOS driver, and the DXMT library set. The ARM64 archive also carries FEX and Mesa. - The component commits of each lane in
runtime.jsonmatch the source links in Third-party notices. The x86 lane lists MoltenVK; the ARM64 lane lists FEX and Mesa. - The app bundle contains
LICENSE,RUNTIME.json, andThirdPartyNotices.deflate. The website publishes current Third-party notices and License texts. Settings → About → Third-Party Notices shows the launcher list and the notices of the installed runtime. scripts/licenses.py --checkpasses. On a machine with a prepared runtime,scripts/licenses.py --check --strict --runtime .build/runtime-x86also passes. The step fails on a stale generated block or on any unverified launcher component.- Each pinned runtime archive has its own reviewed source and notice package. For each runtime library, the runtime repository records the exact version or revision, notices, preferred-form source, and build scripts. The client does not publish a runtime closure inventory. The packaging checks cannot decide this step. See Source code.
- Install, first-run runtime download, Update, Repair, and Play work from the DMG on a clean Mac. Test both architectures on macOS 26.5 or later.
If an artifact lacks a notice, has another runtime checksum, or points to the wrong tag, keep the release as a draft and open a repository issue with the version and asset.
Runtime updates#
runtime.json is the single source of truth for the pinned runtimes. It has schema 4 and two lanes: x86 and arm. Each lane carries the runtime name, version, archive URL, SHA-256, size, deltas, interface, component versions, provenance, minimumMacOS, and prefixRevision.
One launcher release serves both architectures. The launcher chooses the lane by macOS version, not by a separate app build or Sparkle channel. It picks arm from AppConstants.Runtime.armLaneMinimumMacOS (26.5) and x86 below. Settings → Runtime → Danger zone → Runtime choice overrides the automatic choice. The launcher downloads the runtime for the chosen lane on first use, and a switch never starts a download.
Runtime lanes#
A lane is one runtime architecture. The x86 lane runs the WineCX and DXMT binaries through Rosetta 2. The arm lane runs native ARM64 Wine with FEX and Mesa.
| Lane | Minimum macOS | Game environment | Runtime content |
|---|---|---|---|
x86 |
15.0 | Environments/<publisher>-x86 |
WineCX, DXMT, MoltenVK |
arm |
26.5 | Environments/<publisher>-arm |
Wine, FEX, Mesa, DXMT |
The top-level architecture value is the default lane for just runtime and local tooling. The launcher resolves the lane from the macOS version and the saved override; it never reads the x86 interface for an ARM runtime. The minimumMacOS column is the lane's hard floor; the automatic choice can require a newer version.
Each runtime release compiles all compatibility patches into one build. The client selects patch behavior at launch with one LMISXH_AKMOCL_<NAME> gate per patch. It sends each gate its lane contains as 1 or 0. See Launch and process lifecycle.
The ARM64 runtime is built in the wine-build-new repository.
There is no runtime feed, no runtime update check, and no previous-runtime rollback. A runtime change ships with a new client version. The app update replaces a stale pinned runtime for each lane that it uses.
Runtime deltas#
Each archive is a .tar.xz with one top-level Runtime/ directory. That directory is the installed runtime root. The format is in the runtime repository at docs/runtime-format.md.
A lane's deltas list names archives that update an older release to the pinned runtime. Each entry has from, url, sha256, and sizeBytes. The client uses a delta only when the installed runtime version equals from. It falls back to the full archive on any delta failure.
The release manifest lists only the deltas of a release. A prerelease has none. The script copies the deltas and sorts them newest source first. A release without deltas pins an empty list.
Update the pin#
- Run
just runtime update TAG. For example,just runtime update v1.0.0. - Read the changed files with
git diff. - Run
just check scriptsandjust runtime check. - Download each lane with
uv run --locked scripts/download_runtime.py --architecture LANE. - Test a fresh and an existing prefix through install or update, game start, and clean exit.
- If you pinned one lane, confirm that the other lane and its prefix are unchanged.
One release tag covers both lanes. Each lane has its own archive and manifest, named with its architecture.
TAG is a release tag or latest. latest is the default. It selects the newest published release and skips drafts. It skips prereleases unless you add --include-prerelease.
| Option | Use |
|---|---|
--tag TAG |
A release tag or latest. |
--architecture LANE |
Pins one lane: x86 or arm. Without this option, both lanes are pinned. |
--include-prerelease |
Lets latest select a prerelease. |
--moltenvk-version VER |
The MoltenVK version. Required only if its commit changed. |
--check |
Verifies the pin and writes nothing. It uses no network. |
What the script reads#
The script reads these assets of the release over HTTPS. It does not download a runtime archive.
runtime-x86_64.json: the runtime manifest of thex86lane. Schema 1.runtime-arm64.json: the runtime manifest of thearmlane. Schema 1.SHA256SUMS: the digest of each asset. The script checks the manifests, archives, and deltas against it.
The manifest names the archive, the deltas, the lane interface, the component versions, and the provenance. The script copies these fields into runtime.json.
The script fails and writes nothing in these cases:
- The manifest is not valid JSON, has another schema version, or lacks a field.
- The manifest names another architecture or version than the tag.
SHA256SUMSdoes not list the manifest, the archive, or a delta, or lists another digest for it.- The copied interface, components, or provenance are not a valid runtime configuration.
- The MoltenVK commit changed. Pass
--moltenvk-versionwith the new version.
What the script rewrites#
| Target | Fields |
|---|---|
runtime.json |
lanes.LANE fields runtime, minimumMacOS, interface, components, and provenance. |
docs/legal/third-party-notices.md |
The runtime blocks components and build. |
docs/legal/source-code.md, license-texts.md |
The script calls scripts/licenses.py. That script regenerates them. |
A second run with the same tag changes nothing. Pinning one lane never rewrites the other lane.
Manual steps#
Change these by hand when the release changes them.
prefixRevisionof the lane. Increase it when a runtime or prefix configuration change must reach existing installations. The archive checksum is part of the effective runtime revision, so a binary-only refresh replays the runtime migrations without aprefixRevisionincrease.- The
librarieslist indocs/legal/licenses/index.jsononly if the client index itself gains a component. The runtime closure is not part of the client.
Check the pin#
just runtime check runs scripts/update_runtime.py --check. The test suite also checks a fixture pin. The check fails when:
- A lane's
runtime.versionorruntime.namedisagrees with the tag in the archive URL. - A lane's
runtime.urlis not an archive of that tag. runtime.sizeBytesorruntime.sha256is invalid.- A generated
runtimeblock in a document differs fromruntime.json. - The file still has
armInterface, a top-levelruntime, a top-levelinterface, orbuildRecipe.
Add a marker#
A marker pair surrounds a generated block. The generator replaces the lines between the two markers.
<!-- runtime:begin NAME -->
<!-- runtime:end NAME -->
- Write a render function in
scripts/lib/runtime_update.py. It takesruntime.jsondata and returns Markdown that ends with a newline. - Add the function to the dictionary in
render_documents. The key is the document path. The value mapsNAMEto the function result. - Add the marker pair to the document. Use a lowercase
NAMEwith hyphens. - Run
uv run --locked scripts/update_runtime.py --tag TAG. Add a test toscripts/tests/test_update_runtime.py.
License automation owns the marker rules. The runtime blocks belong to this script.
Versioning and changelog#
Versions follow Semantic Versioning. Before 1.0, minor versions can contain deliberate compatibility changes and patch versions contain compatible fixes. User-visible work starts in Unreleased and moves to an X.Y.Z section before release. Use the Added, Changed, Fixed, and Removed headings. Use exact UI labels. Describe the shipped change, not intermediate builds.
The extractor accepts a ## [X.Y.Z] heading with an optional - description suffix. It takes content up to the next ## [ heading. It fails when the section is missing or empty.
Signing and Sparkle updates#
Releases are ad-hoc signed and not notarized. Users must follow the installation guide for Apple's Open Anyway flow. Sparkle signs updates separately with Ed25519 and replaces the complete app bundle through its helper. This does not remove the first-launch Gatekeeper confirmation.
The launcher checks for app updates silently when it opens (the user can disable this in Settings). Sparkle owns download, verification, and installation of the app. The runtime is not part of the app update; the launcher replaces a stale pinned runtime after the app updates. Game updates are checked separately and never download without a user action.
The workflow sets CFBundleVersion one above the newest build in the latest appcast. A yanked release leaves that appcast, so its users would keep a higher build. Pass that build plus one as minimum_build (just release X.Y.Z 28) so Sparkle offers them the replacement.
Launchers 1.0.3 and later read the appcast from https://lumisxh.github.io/Arknights-MacOS-Client/appcast.xml. GitHub Pages serves a copy of the canonical feed. The canonical feed is the appcast.xml asset of the appcast-feed release. That release is always a prerelease, so it is never latest, and the release workflows ignore it.
Each release has a complete .tar.xz update archive (up to 0.6.x: .zip). Sparkle 2.9.6, the oldest shipped updater, extracts both.
A draft does not touch the canonical feed. Draft release reads the feed, adds the new item, and attaches the result as appcast-staged.xml. It also attaches appcast-base.txt with the SHA-256 of the feed it started from, or none when no feed existed. The first run after this change reads the latest release's appcast.xml instead.
When you publish the draft, Publish appcast compares the base with the current feed. If they match, it uploads appcast-staged.xml as the canonical appcast.xml, deletes the two staged assets, and starts Publish website. If not, it fails and leaves the feed unchanged. The job needs no signing secret, because the staged feed is already signed and launchers verify the signature.
The workflow does not change older items in the feed. It signs and verifies only the item of the new build: its archive, its deltas, its gate, and its critical flag. The feed signature covers the whole file, so it is signed again.
Every stable release also attaches a stable-only appcast.xml. Launchers before 1.0.3 read it through releases/latest/download/appcast.xml. Release 1.1.0 is the planned cutoff for keeping it. Before that release, move the previous-build read in release.yml to the canonical feed only.
Every Publish website run downloads the canonical feed and fails when it is missing or empty. Start it from GitHub Actions to redeploy the site without a release.
The workflow creates the archives from the fully packaged app, preserving bundle symlinks and executable modes. It generates and signs the appcast with Sparkle's generate_appcast. Before it creates the draft, it validates the key pair and runs Sparkle's sign_update --verify on the appcast, the archive, and every delta. This rejects a bad signature or a tampered file before publication.
The release feed marks the new build's item informational for clients below build 18 (0.6.0). The item is the newest in its own channel. Those launchers cannot migrate their data, so they get an information link and no install action. Users must delete the launcher data and reinstall. Clients at 0.6.0 or newer update normally. sparkle_deltas.py finalize inserts the gate before signing, and validate_sparkle_keys.py rejects a feed without it.
The workflow also checks that the bundle contains Sparkle.framework with symlinks and nested XPC and helper code intact, an @executable_path/../Frameworks rpath, inside-out ad-hoc signatures, and a final outer-bundle verification. For a release candidate, install the DMG, start a newer signed update from the launcher, and confirm the themed update UI and the download and restart flow. Repeat during an active game or installation to verify that replacement is deferred.
Key rotation is deferred. Sparkle 2.9.6's generate_appcast adds no enclosure signature when the signing seed does not match the embedded public key. Each installed client authenticates the signed feed with its own key (Sparkle's guide). One replacement appcast.xml cannot serve both K0 and a new K1. Keep K0 until all of these are true:
- A bridge release can be signed explicitly with
sign_update. - The K0 and K1 generations have separate authenticated feed routes.
- Packaged A→B and B→C paths pass tests, including a lagging A client that still receives B after C is published.
Current clients are ad-hoc signed, so losing K0 requires an independently authenticated recovery path. A new Apple signing identity cannot repair it afterward.
Delta updates#
Sparkle deltas cover changes to the launcher, Sparkle.framework, and app resources. The runtime is not in the app bundle, so a runtime change no longer changes the app archive. Before generate_appcast, scripts/sparkle_deltas.py fetch downloads the full update archives of the newest published releases (SPARKLE_DELTA_SOURCE_COUNT in scripts/lib/project_config.py). generate_appcast --maximum-versions 1 --maximum-deltas N then builds one delta per source and keeps only the new version in the feed. Clients older than the oldest source, or that reject a delta, use the full archive.
Delta generation is best effort. A missing release, failed listing, or failed download logs a warning and skips that source. The complete archive still ships.
generate_appcast names deltas after the app bundle, but GitHub stores the asset with dots, which breaks the URL. scripts/sparkle_deltas.py finalize copies the referenced deltas into dist/ under GitHub-safe names, rewrites their URLs, and signs the feed again with the K0 seed, because the signature covers those URLs. validate_sparkle_keys.py --delta-directory dist then verifies every delta with sign_update --verify. Deltas are in SHA256SUMS and the attestation.
Sparkle ignores the custom Icon\r file that NSWorkspace.setIcon writes into the bundle, so icon customization does not invalidate deltas. Any other bundle change makes Sparkle use the full archive.
Onboarding after a release#
The setup assistant always does one silent Sparkle check before version-specific onboarding, regardless of the automatic-check preference. If a newer release exists, setup stays pending and opens Sparkle's updater. It resumes after the newer launcher is installed and reopened. A failed network check does not block first-run setup.
On a new installation, setup also asks for the runtime architecture. See Game runtime for the macOS rule.
To make every existing user rerun setup after a release, bump AppConstants.Onboarding.schemaVersion. Schema 2 shipped with 0.7.0. Schema 3 ships with 1.0. It merges the runtime download, game location, and Rosetta 2 into the Install step and adds the Look step. Preferences stay unchanged. Only setup progress resets. Schema 4 ships with 1.0.3 and adds the Update channel question to Updates and Integrations.
To make the rerun mandatory, also add the new schema to OnboardingProgressStore.requiredSchemaVersions and give it a reason in OnboardingWelcomeView.requiredSetupReason(schema:). Returning players then see why, and Skip Setup stays hidden until they finish. First-time users can still skip. Schemas 2, 3, and 4 are required. In debug builds, the Required toggle next to Onboarding preview in the developer simulator shows this state.