Skip to content

Publish the signed macOS app and its Homebrew cask with every release - #140

Merged
ponytojas merged 5 commits into
mainfrom
task/d7-macos-app-dmg-homebrew-cask-and-release
Nov 26, 2026
Merged

ponytojas merged 5 commits into
mainfrom
task/d7-macos-app-dmg-homebrew-cask-and-release

Conversation

@ponytojas

Copy link
Copy Markdown
Collaborator

Part of #71. The issue stays open until a tag shows it works end to end: a clean-Mac install from the DMG, and brew install --cask, which depends on #93.

Release

  • release.yml calls macos-app.yml (job macos-app, needs: tools) with the tag, require-signed: true and tools-artifact: true. The app is built with the tool archives that tools.yml built and smoke-tested in the same run. If a secret is missing, or signing or notarization fails, the release fails; it never falls back to an ad hoc build. The signing and Sparkle secrets are passed explicitly.
  • The release job waits for it and refuses to publish unless Refract-<arch>.dmg and Refract-<arch>.zip are there for arm64 and amd64. The appcast check now always requires both feeds on a full release (the "a release without the app" exception is gone); a prerelease still has none.
  • metadata waits for macos-app too, to generate the cask from the signed disk images.

Homebrew cask refract-app

  • scripts/package-metadata.py writes refract-app.rb: per-architecture sha256, url .../v#{version}/Refract-#{arch}.dmg, depends_on macos: :ventura (matches LSMinimumSystemVersion 13.0), auto_updates true (Sparkle). It reads both DMGs before writing anything.
  • zap removes only what the app can rebuild (caches, WebKit data, HTTPStorages, preferences, saved state, logs), never ~/Library/Application Support/Refract or the Keychain key. A caveat says so.
  • The homebrew job also copies it to Casks/refract-app.rb. The formula refract (the CLI) is unchanged.

Docs

README: a new "The Mac app" section in Quick start (stable releases/latest/download/Refract-<arch>.dmg links, the cask, where data and the key live), and CI and releases. packaging/README.md: the release and the tap. CHANGELOG.

Checks

  • python3 -m unittest scripts/test_packaging.py: 30 tests pass, including new ones: the cask matches the DMGs and the minimum macOS, zap never touches projects or the key, a missing DMG fails before writing, and the release wires the signed app and the cask.
  • A generated cask passes ruby -c and brew style with no offenses, and release.yml parses.
  • The release itself only runs on a tag, so it isn't exercised here.

For the maintainer

  • The tap isn't updated automatically yet: HOMEBREW_TAP_TOKEN and HOMEBREW_TAP_ENABLED aren't set. Until they are, copy refract-app.rb from the release to Casks/ by hand (packaging/README.md, Homebrew).
  • The first tag after this merges should be a prerelease (vX.Y.Z-rc1), to check the DMGs and the cask before a full release becomes latest, which installed apps read their feed from.

@Lorena-J Lorena-J left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!! I’d request changes before merging. The first RC needs a working upgrade path to stable, and the quick-start instructions should go live once the stable DMGs and Homebrew cask are available. I ran the packaging suite: 29 tests passed and one was skipped. The signed release itself remains untested, and packaging/README.md has a merge conflict with main.

needs: tools
uses: ./.github/workflows/macos-app.yml
with:
version: ${{ github.ref_name }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The proposed RC and its stable release get the same build version. I checked macos/build-app.sh: both v0.3.0-rc1 and v0.3.0 produce CFBundleVersion=0.3.0. Sparkle compares that value, so someone who installs the RC won’t be offered the stable release. Could we give the stable build a higher build number and test that upgrade path?

Comment thread README.md Outdated

### The Mac app

Download the disk image for your Mac from the [latest release](https://github.com/ponytojas/Refract/releases/latest): [Apple silicon](https://github.com/ponytojas/Refract/releases/latest/download/Refract-arm64.dmg) or [Intel](https://github.com/ponytojas/Refract/releases/latest/download/Refract-amd64.dmg) (**Apple menu → About This Mac** says which). Open it and drag **Refract** to **Applications**. Or with Homebrew:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The latest stable release has no DMGs yet, and the Homebrew tap has no refract-app cask. Since the first planned release is an RC, it won’t become latest or update the stable tap. Could we publish these quick-start instructions once both installation paths are live?

@ponytojas
ponytojas merged commit 52e4b31 into main Nov 26, 2026
4 checks passed
@ponytojas
ponytojas deleted the task/d7-macos-app-dmg-homebrew-cask-and-release branch November 26, 2026 15:30
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.

2 participants