feat: Add GitHub Actions workflow for automated releases#60
feat: Add GitHub Actions workflow for automated releases#60djach7 wants to merge 1 commit intocontainers:mainfrom
Conversation
Summary of ChangesHello, 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
🧠 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
701d28a to
3d544b2
Compare
|
/gemini review |
There was a problem hiding this comment.
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.
3d544b2 to
9907242
Compare
|
/gemini review |
There was a problem hiding this comment.
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.
kgiusti
left a comment
There was a problem hiding this comment.
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>
9907242 to
2712a88
Compare
|
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... |
kgiusti
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
| - format: tar.gz | |
| - formats: ["tar.gz"] |
| {{- if .Arm }}v{{ .Arm }}{{ end }} | ||
| format_overrides: | ||
| - goos: windows | ||
| format: zip |
There was a problem hiding this comment.
| format: zip | |
| formats: ["zip"] |
Resolves #28