Skip to content

chore: update release workflows #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

leggetter
Copy link
Collaborator

Updates the release workflow to be more robust, flexible, and aligned with current best practices for npm, Homebrew, Scoop, and Docker distribution.

  1. Dynamic Branch Releasing: The publish-npm job in your .github/workflows/release.yml file now correctly determines the branch from which a release tag was created, checks it out, and commits the package.json version update back to that specific branch.

  2. Pre-release Tagging for npm: The workflow correctly identifies pre-release versions and assigns the appropriate distribution tag when publishing to npm, preventing pre-releases from being marked as latest.

  3. Homebrew Cask Releases: GoReleaser configuration in .goreleaser/mac.yml has been updated to build and publish Homebrew Casks instead of Formulas.

  4. Dynamic Scoop Package Naming: Windows GoReleaser configurations (.goreleaser/windows.yml and .goreleaser/windows-npm.yml) now dynamically name the Scoop package hookdeck-beta for pre-releases.

  5. Conditional Docker latest Tag: Your Linux GoReleaser configuration (.goreleaser/linux.yml) now only applies the latest Docker tag to stable releases.

@leggetter leggetter requested a review from Copilot June 16, 2025 14:32
Copy link

@Copilot 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 enhances the release pipelines by making branch detection and tagging more dynamic, aligning Homebrew targets for casks, adjusting Scoop package naming for pre-releases, and conditionally applying Docker latest tags only to stable releases.

  • Windows Scoop entries now toggle between hookdeck and hookdeck-beta based on prerelease status.
  • Homebrew configuration converted from Formula to Cask, with added postflight hooks and caveats.
  • Docker image templates and manifests in Linux only apply latest tags when not a prerelease.
  • Release workflow automatically finds and checks out the correct branch for tag commits and applies proper npm tags for prereleases.

Reviewed Changes

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

Show a summary per file
File Description
.goreleaser/windows.yml Added conditional name field for Scoop package
.goreleaser/windows-npm.yml Removed deprecated Windows-npm GoReleaser config
.goreleaser/mac.yml Replaced Formula with Cask config, added caveats and postflight blocks
.goreleaser/linux.yml Wrapped latest Docker tags in prerelease conditionals and updated manifest disabling
.github/workflows/release.yml Introduced dynamic branch detection and npm tag logic
Comments suppressed due to low confidence (3)

.goreleaser/mac.yml:54

  • This line is not indented inside the postflight do block, so it will execute outside the custom_block and likely cause a YAML or runtime error. Please indent it under the postflight do block by two spaces.
bash_completion.install "hookdeck-completion.bash"

.goreleaser/linux.yml:59

  • Conditionally rendering this image template will yield an empty string for prereleases, which may produce an invalid Docker tag. Consider using GoReleaser's when condition or removing empty entries after rendering.
- "{{ if not .Prerelease }}hookdeck/hookdeck-cli:latest-amd64{{ end }}"

.goreleaser/linux.yml:75

  • Similar to the amd64 entry, this conditional can result in an empty template for prereleases and cause invalid tag entries. You might use a when clause or filter out empty tags in your pipeline.
- "{{ if not .Prerelease }}hookdeck/hookdeck-cli:latest-arm64{{ end }}"

@leggetter leggetter changed the title feat: update release workflows chore: update release workflows Jun 16, 2025
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