Skip to content

3 Create GitHub action - #4

Merged
yeminko merged 4 commits into
mainfrom
3-create-github-actions
Oct 7, 2026
Merged

yeminko merged 4 commits into
mainfrom
3-create-github-actions

Conversation

@yeminko

@yeminko yeminko commented Oct 7, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a new GitHub Actions workflow to automate updating the Homebrew tap formula for the project upon each release. The workflow calculates the release tarball's SHA-256 checksum, updates the gitid.rb formula in the homebrew-tap repository, and pushes the changes automatically.

Release automation:

  • Added a .github/workflows/release-tap.yaml workflow that triggers on release publication, computes the release tarball SHA-256, updates the gitid.rb formula in the homebrew-tap repository with the new tag and checksum, and commits the changes automatically.

Copilot AI lite review requested due to automatic review settings October 7, 2026 08:02
@yeminko yeminko linked an issue Oct 7, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical shell-injection risk and additional workflow reliability issues must be addressed.

Review effort: Lite
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Adds a release-triggered GitHub Actions workflow to update and push the Homebrew tap formula.

Changes:

  • Computes the release tarball SHA-256 checksum.
  • Updates gitid.rb with the release tag and checksum.
  • Commits and pushes changes to homebrew-tap.
File Summary
.github/​workflows/​release-tap.yaml Adds release automation. Findings include unsafe shell interpolation of the release tag (critical), insufficient curl error handling, silent formula-update failures, and concurrent-release push conflicts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/release-tap.yaml Outdated
Comment thread .github/workflows/release-tap.yaml
Comment thread .github/workflows/release-tap.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved shell interpolation and tag-escaping issues can execute commands or produce invalid formula updates.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (3)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Escape Git tag characters before sed replacement

.github/​workflows/​release-tap.yaml:43

The tag is placed unescaped in the replacement part of a sed expression. Valid Git ref names can contain characters such as & and |; & expands to the entire matched URL and | breaks the command, so publishing such a tag can produce an invalid formula or fail the job. Escape replacement metacharacters before substitution (or use a parser).

Comment thread .github/workflows/release-tap.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Fix the unsafe tag substitution and validate that formula updates actually occur.

Review effort: Lite
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Escape Git tag metacharacters before sed substitution

.github/​workflows/​release-tap.yaml:44

A valid Git tag can contain & (and |), but interpolating it directly into the sed replacement makes & expand to the entire matched URL and | terminate the replacement. For example, v1.0.0&beta produces a malformed formula URL, so releases using those tag names will commit an unusable formula. Escape sed replacement metacharacters (or update the formula with a structured script) before substituting the tag.

@yeminko
yeminko merged commit 4e7ba34 into main Oct 7, 2026
2 checks passed
@yeminko
yeminko deleted the 3-create-github-actions branch October 7, 2026 11:57
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.

Create GitHub Actions for Releasing Homebrew Tap

2 participants