Repository navigation
feat(app): attach a signed Ovis.dmg to every release and link it from ovis.sh - #1834
Conversation
… ovis.sh A new Mac app workflow builds app/mac on a GitHub-hosted Mac, signs it with the Developer ID from repository secrets in a temporary keychain, notarizes and staples it, and attaches Ovis.dmg to the release. Release calls it after publishing, and it can be run by hand for an existing tag. Without the secrets it skips with a notice. Release now publishes without marking the release latest; the Mac job marks it latest once the DMG is attached, so ovis.sh/Ovis.dmg (redirecting to releases/latest/download/Ovis.dmg) never lands on a release without one. ovis.sh's Mac button becomes that download link; iPhone and Android stay coming soon.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
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. Comment |
Deploying ovis with
|
| Latest commit: |
685b550
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0d528185.ovis.pages.dev |
| Branch Preview URL: | https://feat-mac-dmg-release.ovis.pages.dev |
|
Checked on the Cloudflare preview of this head (685b550):
CodeRabbit hit its review limit on this PR, so no CodeRabbit review has run yet. |
|
Merge pass review-work report. Overall: PASSED. This PR changes workflows and CodeRabbit was rate-limited, so per AGENTS.md this comment records the independent review, its findings and how each was resolved.
Merging runs nothing.
Verified.
Findings and how each was resolved. None blocks; all are left as follow-ups.
Not verified: real notarization and a quarantined launch of a CI-built dmg. Merge order: this PR shares All required checks are green and no review thread is open. CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it. |
.github/workflows/mac-dmg.yml (#1834) arrived after the pins with actions/checkout@v7; it now uses the same v7.0.1 commit SHA as every other checkout. It already kept no Git credential, and its tag fetch reads the public repository anonymously. The release publish fixture expects the --latest=false that #1834 added to gh release create.
.github/workflows/mac-dmg.yml (#1834) arrived after the pins with actions/checkout@v7; it now uses the same v7.0.1 commit SHA as every other checkout. It already kept no Git credential, and its tag fetch reads the public repository anonymously. The release publish fixture expects the --latest=false that #1834 added to gh release create.
… action updates (#1847) ## What this does Hardens the supply chain of every workflow without changing what any job does. - **Pins every external action to a commit SHA.** All 9 external actions used in `.github/workflows/*.yml` and `.github/actions/setup-ci/action.yml` now use the full commit SHA their current tag points to, with the exact release in a `# vX.Y.Z` comment. No major version changes. A moved or compromised tag can no longer change what CI runs. Each pin was checked against `gh api repos/<action>/commits/<tag>`. That includes what main added since this branch was cut: #1743's self-hosted runner work changed no workflow files, and the new Mac app workflow (`mac-dmg.yml`, #1834) gets the same pinned checkout. The pin test failed on it until it did, so the next new workflow is caught the same way. - **`persist-credentials: false` on every `actions/checkout`.** No later step needs the checkout's token: the repository is public, so the release and Release guards fetches read it anonymously, and `gh release create` authenticates with `GH_TOKEN`. Nothing in CI runs `git push`. - **Dependabot also scans the setup-ci composite action** (`directories: ["/", "/.github/actions/setup-ci"]`): `/` only covers `.github/workflows`, so those pins would never have been updated. - **Dependabot waits 7 days before taking a new action release** (`cooldown.default-days: 7`; [GitHub's default is 3](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference)). Security updates are never delayed. `dependabot.yml` says how to take an urgent fix by hand. ## Why A tag-pinned action runs whatever the tag points to today, and a checkout that keeps its token leaves it in `.git/config` for every later step. Both are the usual ways a compromised action spreads. ## How it was verified - `scripts/ci-setup.test.ts` parses every workflow and the composite action, and rejects a floating ref, a missing version comment, a non-local reusable workflow or a checkout that keeps its credential, naming the step. Dropping one `persist-credentials: false` fails it, and so did the unpinned `mac-dmg.yml` checkout until it was pinned. - `bun test ./scripts/ci-setup.test.ts ./scripts/ci-runner-route.test.ts ./scripts/ci-browser.test.ts ./scripts/pages-gate.test.ts`: 82 pass. `bun run check fast` passes (pinned actionlint). - Code review (omo-native-code-reviewer): APPROVE, no HIGH. It confirmed anonymous fetches against real GitHub and the validity of `directories` + `groups` + `cooldown`. The merge pass's test findings were fixed by deleting the tests that could not fail; see the PR comments. ## Review **This changes workflows and checkout credentials: it needs a real review before merging.** If the repository ever becomes private, the anonymous fetches in `release.yml` and the Release guards step will need a token again. --------- Co-authored-by: mp <mp@local>
What it does for the user
Anyone can download Ovis for Mac (
app/mac, the one-click setup app) from https://ovis.sh and open it without a Gatekeeper warning, and every release keeps that download current with no hand work..github/workflows/mac-dmg.yml(Mac app). On a GitHub-hostedmacos-latestrunner it checks out the release tag, imports the Developer ID Application identity from secrets into a temporary keychain, runsapp/mac/build.sh(version from the tag), notarizes and staples the DMG, and uploadsOvis.dmgto the release (--clobber). The keychain and the keys are removed in analways()step.release.ymlcalls it afterpublish(workflow_call,secrets: inherit), since a release created withGITHUB_TOKENfires noreleaseevent.workflow_dispatchwith ataginput gives an existing release (for example v0.4.13) its DMG.gatejob checks the ref is main, the tag shape and that the release is published. When any of the five secrets is missing, it ends with a::notice::naming them and exits 0, so the release does not fail. The gate only receives set/unset flags, never the secret values.release.ymlnow publishes with--latest=false. The Mac job marks the release latest onceOvis.dmgis attached, and only when its tag is the newestv*tag, so a by-hand run for an older tag never takes "latest" back. Nothing else in the repo readsreleases/latest(checked with grep). If the Mac job skips or fails, the previous release stays latest until the workflow is run for the new tag._redirectsadds/Ovis.dmg→https://github.com/devswha/ovis/releases/latest/download/Ovis.dmg(302).platform.jsturns the button back into a "Coming soon" note for iPhone and Android visitors, so a phone never gets a dmg link.app/mac/README.mdhas a new Releases section covering the flow and the secrets,docs/development.mdgets a short note in Releasing, and there is a changelog fragment.Secrets (set by the maintainer, Settings → Secrets and variables → Actions)
MAC_DEVELOPER_ID_P12.p12, base64MAC_DEVELOPER_ID_P12_PASSWORDMAC_NOTARY_KEY_P8.p8, base64MAC_NOTARY_KEY_IDMAC_NOTARY_ISSUERHow it was verified
mac-dmg.ymlandrelease.yml.bun test scripts/ovis-site.test.ts scripts/ovis-site-platform.test.ts scripts/changelog-fold.test.ts scripts/pages-gate.test.ts: 83 pass.bun run check fastalso passes.::notice title=Ovis.dmg skipped::…, exits 0 and outputsready=false.v0.4.13, it outputsready=true..p12(only the test copy dropped-vfromfind-identity, because the stand-in is untrusted):build.shsigned the app (hardened runtime, timestamp) and the DMG with it.0.0.1).sedbug:find-identityappends a trust suffix after the quoted name.build.shalready does it with the same environment variables.<a class="dl-primary" href="https://ovis.sh/Ovis.dmg">, and App Store and Google Play still say coming soon.?lang=kois translated, and the layout is unchanged at both widths.gpt-6-astra) found nothing.Needs a real review
This changes the release workflow and handles signing secrets, so it needs a real review, not only checks. It touches no
server/,src/orshared/code.