Skip to content

fix(ci): use GitHub App token for homebrew-tap push#39

Merged
pjcdawkins merged 2 commits intomainfrom
fix/tap-github-token
Apr 9, 2026
Merged

fix(ci): use GitHub App token for homebrew-tap push#39
pjcdawkins merged 2 commits intomainfrom
fix/tap-github-token

Conversation

@miguelsanchez-upsun
Copy link
Copy Markdown
Collaborator

Summary

  • Generates a scoped GitHub App token for upsun/homebrew-tap using actions/create-github-app-token@v2
  • Replaces GITHUB_TOKEN with TAP_GITHUB_TOKEN in all GoReleaser brew/scoop repository configs
  • Token generation is gated behind the same if: condition as the release step, so it's only minted during actual releases

Test Plan

  • Trigger a manual release via workflow_dispatch with a tag and verify the token step runs and taps are updated
  • Trigger a snapshot build and verify the token step is skipped

miguelsanchez-upsun and others added 2 commits April 1, 2026 16:35
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 1, 2026 14:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves security by replacing the broad GITHUB_TOKEN with a scoped GitHub App token specifically for the homebrew-tap repository. The changes involve generating a GitHub App token during release workflows and updating GoReleaser configurations to use this dedicated token for Homebrew and Scoop tap updates.

Changes:

  • Adds a new workflow step to generate a GitHub App token scoped to the homebrew-tap repository using actions/create-github-app-token@v2
  • Replaces all 4 instances of GITHUB_TOKEN with TAP_GITHUB_TOKEN in GoReleaser's brew and scoop repository configurations
  • Token generation is gated behind the same conditional as the release step to ensure it only runs during actual releases

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.goreleaser.yaml Updates all homebrew-tap token references from GITHUB_TOKEN to TAP_GITHUB_TOKEN (4 instances across brews and scoops)
.github/workflows/release.yml Adds GitHub App token generation step and passes the scoped token to GoReleaser as TAP_GITHUB_TOKEN environment variable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@pjcdawkins pjcdawkins left a comment

Choose a reason for hiding this comment

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

I'm ok with the APP_ generic secret name

@pjcdawkins pjcdawkins merged commit 68918a4 into main Apr 9, 2026
8 checks passed
@pjcdawkins pjcdawkins deleted the fix/tap-github-token branch April 9, 2026 06:10
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.

3 participants