Skip to content

feat: Add GitHub Actions workflow for automated releases#60

Open
djach7 wants to merge 1 commit intocontainers:mainfrom
djach7:release-workflow
Open

feat: Add GitHub Actions workflow for automated releases#60
djach7 wants to merge 1 commit intocontainers:mainfrom
djach7:release-workflow

Conversation

@djach7
Copy link
Collaborator

@djach7 djach7 commented Mar 19, 2026

  • Create .github/workflows/release.yml with GoReleaser integration
  • Add .goreleaser.yml configuration for multi-platform builds
  • Support Linux, macOS, Windows on amd64 and arm64 architectures
  • Include automated release notes and checksums generation
  • Build both tar-diff and tar-patch binaries

Resolves #28

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's release management by implementing a robust automated release pipeline. It leverages GitHub Actions and GoReleaser to streamline the creation and distribution of multi-platform binaries, ensuring consistent and efficient delivery of new versions to users across various operating systems and architectures.

Highlights

  • Automated Release Workflow: A new GitHub Actions workflow has been introduced to automate the release process using GoReleaser.
  • GoReleaser Configuration: A .goreleaser.yml file was added to configure multi-platform builds for the tar-diff and tar-patch binaries.
  • Multi-Platform Support: The release process now supports building binaries for Linux, macOS, and Windows across both amd64 and arm64 architectures.
  • Automated Release Artifacts: The workflow includes automated generation of release notes, checksums, and the inclusion of README.md, LICENSE, and file-format.md in release archives.
  • Binary Inclusion: Both tar-diff and tar-patch binaries are now built and included in the automated releases.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces automated releases using GoReleaser. The configuration in .goreleaser.yml is a good start, but has a couple of issues. First, the version information injection via ldflags is configured but will not work because the necessary variables are not defined in the Go source files. This is a high-priority issue to fix to ensure binaries are correctly versioned. Second, there is significant duplication in the builds section, which can be refactored for better maintainability using YAML anchors. I've provided a suggestion for this refactoring.

@djach7 djach7 force-pushed the release-workflow branch from 701d28a to 3d544b2 Compare March 19, 2026 13:38
@djach7
Copy link
Collaborator Author

djach7 commented Mar 19, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a GoReleaser configuration for automating releases, which is a great addition. The configuration is mostly solid, but I've found a couple of areas for improvement. A critical issue is the omission of the version in the archive filenames, which could cause confusion between releases. Additionally, there's a minor redundancy in how release assets are packaged. My review includes specific suggestions to address these points.

@djach7 djach7 force-pushed the release-workflow branch from 3d544b2 to 9907242 Compare March 19, 2026 13:56
@djach7
Copy link
Collaborator Author

djach7 commented Mar 19, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a GoReleaser configuration file (.goreleaser.yml) to automate the creation of multi-platform release artifacts. The configuration is comprehensive, covering builds for Linux, macOS, and Windows on amd64/arm64 architectures, and includes documentation files in the archives. My review focuses on improving the maintainability and output of this configuration. I've suggested simplifying the archive naming template and enhancing the changelog generation to produce more structured release notes. Please note that while the pull request description mentions a GitHub Actions workflow file, it was not included in the provided changes for review.

Copy link
Collaborator

@kgiusti kgiusti 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 not sure if the goreleaser tool recognizes that common_build yaml syntax:

root@44a694785430:/go/tar-diff# goreleaser check
  ⨯ command failed                                  
    error=
    │ yaml: unmarshal errors:
    │   line 8: field .common_build not found in type config.Project
root@44a694785430:/go/tar-diff# goreleaser release --snapshot --clean
  ⨯ release failed after 0s                         
    error=
    │ yaml: unmarshal errors:
    │   line 8: field .common_build not found in type config.Project

See goreleaser/goreleaser#4000

You may have to duplicate the code instead of using those anchors.

  - Create .github/workflows/release.yml with GoReleaser integration
  - Add .goreleaser.yml configuration for multi-platform builds
  - Support Linux, macOS, Windows on amd64 and arm64 architectures
  - Include automated release notes and checksums generation
  - Build both tar-diff and tar-patch binaries

  Resolves containers#28

Signed-off-by: djach7 <djachimo@redhat.com>
@djach7 djach7 force-pushed the release-workflow branch from 9907242 to 2712a88 Compare March 25, 2026 12:51
@djach7 djach7 requested a review from kgiusti March 25, 2026 12:58
@djach7
Copy link
Collaborator Author

djach7 commented Mar 25, 2026

Updated to remove the code anchors, ironically that was a gemini suggestion...

@kgiusti
Copy link
Collaborator

kgiusti commented Mar 26, 2026

Updated to remove the code anchors, ironically that was a gemini suggestion...

Seemed like a good suggestion to me as well. Hard to tell when gemini speaks the bullsh*t...

Copy link
Collaborator

@kgiusti kgiusti left a comment

Choose a reason for hiding this comment

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

That fixes the syntax error, and I can run oreleaser release --snapshot --clean and it appears to work, but raises two warnings:

    • DEPRECATED: archives.format should not be used anymore, check https://goreleaser.com/deprecations#archivesformat for more info
    • DEPRECATED: archives.format_overrides.format should not be used anymore, check https://goreleaser.com/deprecations#archivesformat_overridesformat for more info

Turns out they renamed "format" to "formats" and made the arguments a list of strings. I've left the fixes inline if you want to pick them up.

- -s -w

archives:
- format: tar.gz
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- format: tar.gz
- formats: ["tar.gz"]

{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
format: zip
formats: ["zip"]

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 release workflow

2 participants