Skip to content

ci(release): fail on missing signing secrets, verify stapling, pin dmgbuild - #55

Merged
Quost merged 2 commits into
mainfrom
ci/release-hardening
Nov 24, 2026
Merged

Quost merged 2 commits into
mainfrom
ci/release-hardening

Conversation

@Quost

@Quost Quost commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

What changes

Release and dependency hardening from the codebase audit. The release workflow only runs on a tag, so none of this is exercised before the next release. The changes are small and conservative.

Release (release.yml)

  • Fail instead of publishing an unsigned release. If DEVELOPER_ID_P12, APPLE_ID or SPARKLE_PRIVATE_KEY is missing (expired, renamed), the job used to build ad-hoc and publish anyway. On Quost/menew it now stops with an error that names the missing secrets. Forks can still build unsigned.
  • Stapling the app is no longer optional. xcrun stapler staple build/Menew.app || true hid failures, so the Sparkle zip could ship an unstapled app. It now retries like the DMG and fails if it never succeeds. Then stapler validate checks the app and the DMG, and spctl -a -t exec checks Gatekeeper.
  • Only vX.Y.Z tags release. The trigger is v[0-9]+.[0-9]+.[0-9]+ (was v*), plus a regex check on $VERSION.
  • Sparkle key: written with umask 077 and always removed (trap … EXIT). The runner is the maintainer's persistent Mac, and before this a failed step left the key on disk.
  • Empty release notes fail the job instead of publishing a release without notes, for example when the ## X.Y.Z section is missing from CHANGELOG.md.

Build (build.sh)

  • dmgbuild is pinned (1.6.7, the last 1.x). It used to install whatever PyPI served at release time. The venv is named after the version, so bumping it recreates the venv. dmgbuild 2.0.0 came out on 2026-11-16 and is left for a deliberate, tested bump.

Dependabot

  • The github-actions group now only bundles minor and patch updates, so majors come as their own PRs.

(Merged with #59, which had already added the release concurrency group and kept Sparkle out of auto-merge. This PR's duplicates of those two were dropped while resolving the conflict.)

Notes for review

  • The old || true may have been hiding a real staple failure. If the next release fails at "staple app", look into it there rather than reverting.
  • Not done on purpose: creating the release as a draft and publishing it only after the cask bump, so a late failure doesn't leave a live appcast with a stale cask. It can't be tested before a real tag. Worth a follow-up.
  • The YAML files parse (PyYAML) and bash -n build.sh passes.

🤖 Generated with Claude Code

Quost and others added 2 commits November 23, 2026 18:44
…gbuild

- require the Developer ID, notarization and Sparkle secrets on Quost/menew
- retry stapling the app and fail if it never works; validate staples and Gatekeeper
- only match vX.Y.Z tags, validate VERSION, serialize release runs
- write the Sparkle key with umask 077 and always remove it
- fail when the CHANGELOG has no section for the version
- pin dmgbuild (venv named after the version)
- ci(deps): never auto-merge Sparkle; keep majors out of the actions group

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	.github/workflows/dependabot-automerge.yml
@Quost Quost changed the title ci(release): fail on missing signing secrets, verify stapling, keep Sparkle out of auto-merge ci(release): fail on missing signing secrets, verify stapling, pin dmgbuild Nov 24, 2026
@Quost
Quost merged commit bbf02d9 into main Nov 24, 2026
16 checks passed
@Quost
Quost deleted the ci/release-hardening branch November 24, 2026 04:54
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.

1 participant