Skip to content

Add goreleaser#2

Merged
HanXHX merged 2 commits intomasterfrom
add_goreleaser
Feb 24, 2026
Merged

Add goreleaser#2
HanXHX merged 2 commits intomasterfrom
add_goreleaser

Conversation

@HanXHX
Copy link
Copy Markdown
Contributor

@HanXHX HanXHX commented Feb 24, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 24, 2026 14:48
Copy link
Copy Markdown
Contributor

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 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.

Comment thread .goreleaser.yaml
flags:
- -tags=prod
ldflags:
- -s -w -X github.com/retyc/retyc-cli/cmd.Version={{ .Version }}
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- -s -w -X github.com/retyc/retyc-cli/cmd.Version={{ .Version }}
- -X github.com/retyc/retyc-cli/cmd.Version={{ .Version }}

Copilot uses AI. Check for mistakes.
Comment thread README.md
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).
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@HanXHX HanXHX merged commit 2fa8098 into master Feb 24, 2026
6 checks passed
@HanXHX HanXHX deleted the add_goreleaser branch February 24, 2026 15:03
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.

2 participants