diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml index 895dd65..d3f0fc1 100644 --- a/.github/workflows/release-assets.yml +++ b/.github/workflows/release-assets.yml @@ -35,10 +35,17 @@ jobs: target_os: linux arch: x86_64 binary: rob - - os: macos-latest + - os: macos-15 target_os: macos arch: aarch64 binary: rob + # Standard (free) runner on public repos; no -large suffix needed. + # Emits macos-x86_64 so Rokit can serve Intel Macs, which it otherwise + # cannot detect: Rokit validates OS but not architecture. + - os: macos-15-intel + target_os: macos + arch: x86_64 + binary: rob runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -159,7 +166,7 @@ jobs: found=$((found + 1)) test "$(tr -d '\r\n' < "$file")" = "$expected" done < <(find commits -name built-commit.txt | sort) - test "$found" -eq 3 + test "$found" -eq 4 - name: Upload without replacing assets env: diff --git a/readme.md b/readme.md index 0181474..511834f 100644 --- a/readme.md +++ b/readme.md @@ -163,12 +163,6 @@ lookup falls back to scoring the executable suffix and contents instead of an exact filename match. Installation works today; matching the repository name would remove that fallback. -> [!warning] Intel Macs -> There is no `macos-x86_64` archive. Rokit 1.2.0 checks the operating system -> of the downloaded binary but **not** its architecture, so on an Intel Mac -> `rokit install` reports success and `rob --version` then fails to execute. -> Use the source build below instead, or omit `rob` from the manifest there. - **Rokit 1.2.0 does not read the `.sha256` sidecar.** If you need integrity beyond a pinned version, a GitHub Release, and Rokit's own trust prompt, verify the digest yourself as shown under the release archive section. @@ -194,7 +188,10 @@ cargo install --path . --locked ### From a GitHub Release archive Download one approved archive and its `.sha256` file for the same version: -Windows x86_64 `.zip`, Linux x86_64 `.tar.gz`, or macOS aarch64 `.tar.gz`. +Windows x86_64 `.zip`, Linux x86_64 `.tar.gz`, macOS aarch64 `.tar.gz`, or +macOS x86_64 `.tar.gz`. The Intel archive was added after `0.8.0` and is being +backfilled onto it; until that lands, use the source build for Intel Macs on +exactly `0.8.0`. Compare the SHA-256 digest before extracting. A match checks the bytes only. It does not prove publisher identity, and these archives are not signed or notarized. The archive contains `rob` or `rob.exe` plus `license-mit` and diff --git a/scripts/package-release.py b/scripts/package-release.py index 4b7d9ea..38b6034 100644 --- a/scripts/package-release.py +++ b/scripts/package-release.py @@ -10,6 +10,7 @@ ("windows", "x86_64"): ("rob.exe", "zip"), ("linux", "x86_64"): ("rob", "tar.gz"), ("macos", "aarch64"): ("rob", "tar.gz"), + ("macos", "x86_64"): ("rob", "tar.gz"), } LICENSES = ("license-mit", "license-apache") @@ -42,8 +43,12 @@ def main() -> None: args = parser.parse_args() try: name, binary_name = archive_name(args.version, args.system, args.arch) - except (KeyError, ValueError) as error: - raise SystemExit(str(error) or "target is outside the approved archive matrix") from error + except KeyError: + raise SystemExit( + f"target {args.system}/{args.arch} is outside the approved archive matrix" + ) from None + except ValueError as error: + raise SystemExit(str(error)) from error if args.binary.name != binary_name or not args.binary.is_file(): raise SystemExit("binary name is outside the approved archive member list") licenses = [args.licenses / item for item in LICENSES] @@ -64,7 +69,9 @@ def main() -> None: archive.add(path, arcname=path.name) digest = hashlib.sha256(destination.read_bytes()).hexdigest() checksum = args.out / f"{name}.sha256" - checksum.write_text(f"{digest} {name}\n", encoding="utf-8") + # Pin the newline so the file stays `sha256sum -c` compatible on every host. + with checksum.open("w", encoding="utf-8", newline="\n") as handle: + handle.write(f"{digest} {name}\n") print(checksum)