Skip to content

fix(release): ship macOS updater artifacts (.app.tar.gz + .sig) and fail loudly on a missing platform - #224

Open
remcostoeten wants to merge 1 commit into
masterfrom
fix/macos-updater-artifacts
Open

fix(release): ship macOS updater artifacts (.app.tar.gz + .sig) and fail loudly on a missing platform#224
remcostoeten wants to merge 1 commit into
masterfrom
fix/macos-updater-artifacts

Conversation

@remcostoeten

@remcostoeten remcostoeten commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Fixes #223

Root cause (confirmed from the v0.37.0 macOS job log)

bundle.targets in apps/desktop/src-tauri/tauri.conf.json was an explicit list — deb, rpm, appimage, nsis, dmg — with no app. On macOS that is the only updater-enabled target, so the bundler did exactly this in run 30212273445:

Warn The bundler was configured to create updater artifacts but no updater-enabled
     targets were built. Please enable one of these targets: app, appimage, msi, nsis
Cleaning .../bundle/macos/Dora.app
Finished 1 bundle at:
    .../bundle/dmg/Dora_0.37.0_aarch64.dmg
...
Looking for artifacts in:
    .../bundle/macos/Dora.app.tar.gz
    .../bundle/macos/Dora.app.tar.gz.sig
Found artifacts:
    .../bundle/dmg/Dora_0.37.0_aarch64.dmg

So: no .app -> no .app.tar.gz -> the upload glob matched nothing. It was silent because actions/upload-artifact defaults to if-no-files-found: warn, and generate-latest-json.ts derives platforms purely from the .sig files it happens to find, so it happily wrote a two-platform manifest and exited 0.

Ruled out: the signing secrets are passed to release-macos exactly like the other jobs (the log shows TAURI_SIGNING_PRIVATE_KEY: *** / ..._PASSWORD: ***), and createUpdaterArtifacts was already true.

Changes

  • tauri.conf.json — add app to bundle.targets. It is macOS-only; Tauri filters package types per target OS, so Linux/Windows bundling is unchanged.
  • release.yml preflight — require the app target and assert createUpdaterArtifacts === true.
  • release.yml per-platform uploadsif-no-files-found: error on all three, plus an explicit pre-upload check in release-macos that the .dmg, .app.tar.gz and .app.tar.gz.sig all exist (the upload action only errors when every pattern misses, so the glob-level check is what actually catches this class of bug).
  • release.yml publish gate — the "at least N assets" check now also requires each signed updater asset by pattern: .exe, .exe.sig, .AppImage, .AppImage.sig, .dmg, .app.tar.gz, .app.tar.gz.sig (count bumped 9 -> 11).
  • generate-latest-json.ts — refactored into exported pure functions (collectPlatforms, assertPlatformsPresent, buildManifest) with a thin CLI main(). It now exits non-zero with an actionable message when any of linux-x86_64, windows-x86_64, darwin-aarch64 is missing. --require-platforms= overrides the set (none disables the check) for local use.
  • ci-mac.yml — pass the signing secrets and assert the three macOS artifacts, so the existing workflow_dispatch mac build doubles as a dry-run for this fix. This is also required: with app in the targets, a macOS build now signs, and would fail without the key.

Verification

  • New __tests__/generate-latest-json.test.ts — 9 tests, all passing. Covers platform mapping, the tag-scoped URL, and the missing-platform failure (including "a .dmg alone does not count as macOS coverage", i.e. the exact v0.36/v0.37 shape).
  • CLI smoke: against a fake assets dir with only linux+windows .sig files the script exits 1 with the missing-platform message; adding Dora.app.tar.gz.sig makes it exit 0 with all three platforms.
  • The new publish-gate bash was replayed against the literal v0.37.0 asset list — it fails with Missing required release assets matching: \.app\.tar\.gz$ \.app\.tar\.gz\.sig$ — and against the expected post-fix list, where it passes.
  • Preflight target/updater check and both workflow YAML files parse and evaluate locally.
  • oxfmt --check and oxlint clean on the changed TS files.

Not verifiable without a real macOS run

That the bundler now actually emits bundle/macos/Dora.app.tar.gz{,.sig} can only be proven on a mac runner. The CI Mac workflow_dispatch run on this branch is the dry-run for it; otherwise the next tagged release is the proof — and if it regresses, the release now fails red instead of shipping a darwin-less latest.json.

Note: the mac updater channel is darwin-aarch64 only (release-macos runs on macos-latest, which is Apple Silicon). Intel macs still have no updater channel — out of scope here.

Summary by Sourcery

Ensure macOS updater artifacts are built and shipped for releases and fail the pipeline when required updater platforms or assets are missing.

New Features:

  • Add a configurable required-platforms check to generate-latest-json so releases must include updater artifacts for specific platforms.

Bug Fixes:

  • Fix missing macOS updater artifacts by including the app bundle target and ensuring its updater tarball and signature are produced and uploaded.

Enhancements:

  • Refactor generate-latest-json into reusable pure functions with a thin CLI wrapper for easier testing and extension.
  • Tighten the release workflow to require the app target, enforce updater artifact creation, and validate that each updater platform has its corresponding signed asset before publishing.
  • Update the macOS CI workflow to run signed builds and verify the presence of macOS updater artifacts as a dry run for releases.

CI:

  • Make upload-artifact steps in release workflows fail on missing files and add a publish gate that checks for all required updater asset patterns across platforms.

Tests:

  • Add unit tests for generate-latest-json covering platform mapping, manifest construction, required-platform overrides, and missing-platform failure behavior.

Summary by CodeRabbit

  • New Features

    • macOS desktop releases now include signed updater artifacts.
    • Release bundles now generate and validate updater packages for Windows, Linux, and macOS.
    • Updater manifests now include downloads for all required platforms.
  • Bug Fixes

    • Releases now fail clearly when expected installers, signatures, or platform artifacts are missing.
  • Tests

    • Added coverage for platform detection, manifest generation, and missing-artifact validation.

…tform is missing

The `app` bundle target was absent from `bundle.targets`, so on macOS the
bundler logged "configured to create updater artifacts but no updater-enabled
targets were built", deleted Dora.app, and produced only the .dmg. The
`bundle/macos/*.app.tar.gz{,.sig}` upload glob then matched nothing (silently,
because upload-artifact defaults to `if-no-files-found: warn`) and
generate-latest-json.ts built latest.json from the .sig files it happened to
find — leaving darwin out of the manifest since at least v0.36.0.

Adds `app` to the bundle targets and hardens the pipeline so this cannot
regress silently: preflight now requires the `app` target and
createUpdaterArtifacts, the per-platform uploads use `if-no-files-found:
error`, the macOS job asserts its three artifacts before uploading, the
publish gate requires every signed updater asset (including .app.tar.gz and
its .sig), and generate-latest-json.ts exits non-zero with an actionable
message when an expected platform is absent.

Fixes #223
@sourcery-ai

sourcery-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dora Ready Ready Preview, Comment Jul 26, 2026 10:10pm

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Tauri now produces the macOS app bundle target and signed updater artifacts. CI and release workflows fail when expected artifacts are missing. Manifest generation validates required platforms, supports configurable requirements, and has expanded test coverage.

Changes

Updater artifact pipeline

Layer / File(s) Summary
Bundle output configuration
apps/desktop/src-tauri/tauri.conf.json, .github/workflows/ci-mac.yml
Adds the Tauri app target, injects signing credentials into macOS builds, and verifies expected macOS updater artifacts.
Updater manifest generation
tools/scripts/generate-latest-json.ts, __tests__/generate-latest-json.test.ts
Extracts platform mapping and manifest construction helpers, validates required platforms, supports configurable requirements, and adds coverage for platform detection and missing artifacts.
Release artifact enforcement
.github/workflows/release.yml
Requires updater artifact configuration, fails uploads with missing files, verifies macOS outputs, and checks required release asset filename patterns before publishing.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TauriBuild
  participant ReleaseWorkflow
  participant GenerateLatestJson
  participant PublishRelease

  TauriBuild->>ReleaseWorkflow: produce signed platform updater artifacts
  ReleaseWorkflow->>ReleaseWorkflow: verify expected uploaded files
  ReleaseWorkflow->>GenerateLatestJson: provide release artifact paths
  GenerateLatestJson->>GenerateLatestJson: map signatures and validate platforms
  GenerateLatestJson-->>PublishRelease: generate validated latest.json
  PublishRelease->>PublishRelease: validate required release asset patterns
Loading

Possibly related PRs

  • remcostoeten/dora#66: Both changes add release workflow checks for required platform updater assets.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main release fix: adding macOS updater artifacts and failing when a platform is missing.
Linked Issues check ✅ Passed The changes address #223 by generating and uploading macOS updater artifacts, enforcing required platforms, and failing on missing assets.
Out of Scope Changes check ✅ Passed No clearly unrelated changes are introduced; the refactor and tests support the release-artifact fix and validation flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/macos-updater-artifacts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The required platform list and updater asset patterns are now hardcoded in both generate-latest-json.ts and the release bash gate; consider centralizing these definitions or adding a single source of truth to reduce the risk of future divergence.
  • The macOS updater artifact verification logic is duplicated between release.yml and ci-mac.yml; extracting a shared script or reusable step would make it easier to keep the checks consistent over time.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The required platform list and updater asset patterns are now hardcoded in both `generate-latest-json.ts` and the release bash gate; consider centralizing these definitions or adding a single source of truth to reduce the risk of future divergence.
- The macOS updater artifact verification logic is duplicated between `release.yml` and `ci-mac.yml`; extracting a shared script or reusable step would make it easier to keep the checks consistent over time.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
.github/workflows/ci-mac.yml (1)

35-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated macOS updater-artifact verification script. Both workflows implement the identical compgen -G loop over dmg/*.dmg, macos/*.app.tar.gz, and macos/*.app.tar.gz.sig; the shared root cause is having no single source of truth for this check.

  • .github/workflows/ci-mac.yml#L35-L47: replace the inline script with a call to a shared script (e.g. tools/scripts/verify-macos-artifacts.sh).
  • .github/workflows/release.yml#L291-L308: replace the inline script with the same shared script/action so both workflows stay in sync if Tauri's output paths ever change.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci-mac.yml around lines 35 - 47, The macOS artifact
verification loop is duplicated across both workflows. Add a shared verification
script, such as tools/scripts/verify-macos-artifacts.sh, containing the existing
checks, then replace the inline scripts in .github/workflows/ci-mac.yml lines
35-47 and .github/workflows/release.yml lines 291-308 with calls to that script
so both workflows use one source of truth.
.github/workflows/release.yml (1)

178-190: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Linux and Windows uploads lack the per-artifact check macOS now has. if-no-files-found: error only fails when the whole path list matches zero files, so a single missing signature file (e.g. *.AppImage.sig or *.exe.sig) among otherwise-present files won't be caught until publish-release's later REQUIRED_PATTERNS scan — the root cause is the absence of a dedicated pre-upload existence check like the new macOS step.

  • .github/workflows/release.yml#L178-L190: add a pre-upload step verifying *.AppImage, *.AppImage.sig, *.deb, and *.rpm each individually exist, mirroring the macOS verification step.
  • .github/workflows/release.yml#L247-L255: add the equivalent per-file check for *.exe and *.exe.sig before upload.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 178 - 190, Before the Linux
upload step at .github/workflows/release.yml:178-190, add a dedicated
per-artifact existence check for *.AppImage, *.AppImage.sig, *.deb, and *.rpm,
mirroring the macOS verification step; before the Windows upload step at
.github/workflows/release.yml:247-255, add the equivalent individual checks for
*.exe and *.exe.sig. Ensure each missing pattern fails before artifact upload
rather than relying on if-no-files-found.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/ci-mac.yml:
- Around line 35-47: The macOS artifact verification loop is duplicated across
both workflows. Add a shared verification script, such as
tools/scripts/verify-macos-artifacts.sh, containing the existing checks, then
replace the inline scripts in .github/workflows/ci-mac.yml lines 35-47 and
.github/workflows/release.yml lines 291-308 with calls to that script so both
workflows use one source of truth.

In @.github/workflows/release.yml:
- Around line 178-190: Before the Linux upload step at
.github/workflows/release.yml:178-190, add a dedicated per-artifact existence
check for *.AppImage, *.AppImage.sig, *.deb, and *.rpm, mirroring the macOS
verification step; before the Windows upload step at
.github/workflows/release.yml:247-255, add the equivalent individual checks for
*.exe and *.exe.sig. Ensure each missing pattern fails before artifact upload
rather than relying on if-no-files-found.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 02c7cfe2-8386-4eed-8b22-50ec7009161c

📥 Commits

Reviewing files that changed from the base of the PR and between 31c3f42 and 2614f3e.

📒 Files selected for processing (5)
  • .github/workflows/ci-mac.yml
  • .github/workflows/release.yml
  • __tests__/generate-latest-json.test.ts
  • apps/desktop/src-tauri/tauri.conf.json
  • tools/scripts/generate-latest-json.ts

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.

fix(release): macOS updater artifacts (.app.tar.gz + .sig) missing — darwin absent from latest.json since at least v0.36.0

1 participant