Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,71 +103,6 @@ jobs:
path: dist/
if-no-files-found: error

update-homebrew-tap:
if: ${{ !endsWith(github.ref_name, '-test') }}
runs-on: ubuntu-latest
needs: release
env:
HOMEBREW_TAP_DISPATCH_TOKEN: ${{ secrets.HOMEBREW_TAP_DISPATCH_TOKEN }}

steps:
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
name: appcast-artifacts
path: dist

- name: Resolve release payload
id: release
shell: bash
run: |
set -euo pipefail

version="${GITHUB_REF_NAME#v}"
tag="${GITHUB_REF_NAME}"
dmg_path="dist/Keyty.dmg"

if [[ ! -f "$dmg_path" ]]; then
echo "missing release artifact: $dmg_path" >&2
exit 1
fi

sha256="$(sha256sum "$dmg_path" | awk '{print $1}')"
dmg_url="https://github.com/${GITHUB_REPOSITORY}/releases/download/${tag}/Keyty.dmg"

{
echo "version=$version"
echo "tag=$tag"
echo "dmg_url=$dmg_url"
echo "sha256=$sha256"
} >> "$GITHUB_OUTPUT"

- name: Dispatch Homebrew tap update
if: ${{ env.HOMEBREW_TAP_DISPATCH_TOKEN != '' }}
env:
GH_TOKEN: ${{ env.HOMEBREW_TAP_DISPATCH_TOKEN }}
shell: bash
run: |
set -euo pipefail

gh api repos/keytyapp/homebrew-tap/dispatches \
--method POST \
--input - <<EOF
{
"event_type": "keyty_release_published",
"client_payload": {
"version": "${{ steps.release.outputs.version }}",
"tag": "${{ steps.release.outputs.tag }}",
"dmg_url": "${{ steps.release.outputs.dmg_url }}",
"sha256": "${{ steps.release.outputs.sha256 }}"
}
}
EOF

- name: Skip Homebrew tap update dispatch
if: ${{ env.HOMEBREW_TAP_DISPATCH_TOKEN == '' }}
run: echo "::notice::Skipping Homebrew tap update dispatch because HOMEBREW_TAP_DISPATCH_TOKEN is not configured."

sync-appcast-website:
if: ${{ !endsWith(github.ref_name, '-test') }}
runs-on: ubuntu-latest
Expand Down
8 changes: 1 addition & 7 deletions Docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Configure these repository secrets before running the workflow:
| `NOTARY_KEY_ID` | App Store Connect API key ID |
| `NOTARY_ISSUER` | App Store Connect issuer ID |
| `SPARKLE_ED_KEY_BASE64` | Base64-encoded Sparkle EdDSA private key |
| `HOMEBREW_TAP_DISPATCH_TOKEN` | Optional token with permission to dispatch workflows in `keytyapp/homebrew-tap`; when present, the release workflow triggers the tap repo's cask-update automation after publishing `v*` release assets |
| `KEYTY_APPCAST_WEBSITE_DISPATCH_TOKEN` | Optional token with permission to dispatch workflows in the website repo; when present, the release workflow triggers the website repo's appcast sync automation after publishing `v*` release assets |

Optionally configure these repository variables:
Expand All @@ -68,11 +67,6 @@ also dispatches `keyty_appcast_release` to the website repository so it can
publish `appcast.xml` to `https://keyty.app/appcast.xml`. Update archives are
hosted as GitHub release assets by default.

When `HOMEBREW_TAP_DISPATCH_TOKEN` is configured, the same workflow also
dispatches `keyty_release_published` to `keytyapp/homebrew-tap` with the new
release version, tag, DMG URL, and DMG SHA-256 so the tap repo can open its own
cask update pull request.

Before generating a new appcast, the release lane downloads the currently
published appcast from `https://keyty.app/appcast.xml` into the Sparkle input
directory. Sparkle then updates that feed with the new release and preserves all
Expand Down Expand Up @@ -146,7 +140,7 @@ git push --tags
- `appcast/Keyty.zip` for Sparkle
- `Keyty.dmg` for GitHub Releases/manual downloads
- `appcast.xml`
10. Update the Homebrew cask if needed.
10. Homebrew Cask picks up the GitHub release automatically; no cask update is required.

## Local Release Fallback

Expand Down
Loading