Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the release process by replacing the manual shell script-based build process with GoReleaser, a popular Go release automation tool. This simplifies the CI workflow, provides better release artifact management, and adds a local testing capability.
Changes:
- Adds GoReleaser configuration file defining build targets, archive formats, and checksums
- Replaces manual build script in GitHub Actions workflow with goreleaser-action
- Updates Makefile with goreleaser target for local testing and cleans dist directory
- Simplifies README installation instructions to point to releases page
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .goreleaser.yaml | New configuration file defining build matrix, ldflags, and release settings for 9 OS/architecture combinations |
| .github/workflows/ci.yml | Replaces ~20 lines of manual build script with goreleaser-action integration; adds fetch-depth: 0 for full git history |
| Makefile | Adds goreleaser target for local snapshot releases and updates clean to remove dist directory |
| README.md | Removes detailed platform-specific installation commands in favor of generic link to releases page |
| .gitignore | Adds /dist directory to ignore GoReleaser build output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| flags: | ||
| - -tags=prod | ||
| ldflags: | ||
| - -s -w -X github.com/retyc/retyc-cli/cmd.Version={{ .Version }} |
There was a problem hiding this comment.
The ldflags include -s -w flags which strip debug information and symbol tables. While this reduces binary size, it makes debugging production issues more difficult. The old manual build process (from the removed workflow code) did not include these flags. Consider whether stripping debug information is the desired behavior, or if it should be configurable.
| - -s -w -X github.com/retyc/retyc-cli/cmd.Version={{ .Version }} | |
| - -X github.com/retyc/retyc-cli/cmd.Version={{ .Version }} |
| chmod +x retyc | ||
| sudo mv retyc /usr/local/bin/ | ||
| ``` | ||
| Download the binary for your platform from the [latest release](https://github.com/retyc/retyc-cli/releases/latest). |
There was a problem hiding this comment.
The removal of step-by-step installation instructions may reduce user experience, especially for users less familiar with GitHub releases. While pointing to the releases page is cleaner, consider keeping at least one example command showing how to download and install a binary, or add a note that users should select the appropriate binary for their platform from the releases page.
No description provided.