Skip to content

fix(ci): migrate homebrew-release.yml from PAT to GitHub App auth#443

Merged
Data-Wise merged 1 commit into
mainfrom
fix/homebrew-app-auth
May 11, 2026
Merged

fix(ci): migrate homebrew-release.yml from PAT to GitHub App auth#443
Data-Wise merged 1 commit into
mainfrom
fix/homebrew-app-auth

Conversation

@Data-Wise
Copy link
Copy Markdown
Owner

Summary

Replaces the workflow_call to Data-Wise/homebrew-tap/.github/workflows/update-formula.yml@main (which depended on the expiring HOMEBREW_TAP_GITHUB_TOKEN PAT) with an inline job that uses GitHub App auth.

The App credentials (APP_ID + APP_PRIVATE_KEY) are already configured on this repo and mint a short-lived, repo-scoped token per run via actions/create-github-app-token@v1.

What changed

  • prepare job: unchanged (computes version + tarball SHA256).
  • update-homebrew job: no longer a workflow_call. Now inlines:
    1. Mint a GitHub App token scoped to Data-Wise/homebrew-tap.
    2. Checkout homebrew-tap with that token (persist-credentials: false).
    3. Patch Formula/flow-cli.rb in place with sed (URL version + first sha256).
    4. Commit and push directly to homebrew-tap's main with retry-on-rebase.

flow-cli specifics (deviations from craft pattern)

  • flow-cli is a hand-crafted formula in the manifest (generated: false), so the workflow does not call generator/generate.py — that would overwrite the carefully maintained def install/def caveats blocks. We patch Formula/flow-cli.rb directly via sed instead.
  • For the same reason, generator/manifest.json is not updated by this workflow (mirroring the existing reusable workflow's behavior, which skips manifest updates when generated: false).
  • source_type: github only, so the URL pattern is the simple GitHub tarball form.

Test plan

  • YAML is valid (python3 -c "import yaml; yaml.safe_load(...)")
  • CI on this PR passes (no release triggered — workflow only runs on release: published or workflow_dispatch)
  • Next v* release tag triggers the workflow successfully against homebrew-tap

References

@Data-Wise Data-Wise merged commit 111e8c8 into main May 11, 2026
1 check passed
@Data-Wise Data-Wise deleted the fix/homebrew-app-auth branch May 11, 2026 01:46
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