Conversation
Signed-off-by: Nelo-T. Wallus <red.brush9525@fastmail.com>
Signed-off-by: Nelo-T. Wallus <red.brush9525@fastmail.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the GoReleaser configuration and adds a dedicated GitHub Actions workflow for releases. The changes simplify the GoReleaser configuration by removing custom archive formatting, changelog filters, and release footer, opting instead for GoReleaser v2 defaults.
Changes:
- Simplified
.goreleaser.yamlto use GoReleaser v2 defaults with minimal configuration - Added
.github/workflows/release.ymlfor automated releases on version tags - Added
make lintas a pre-release hook
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .goreleaser.yaml | Simplified configuration using GoReleaser v2 defaults, added lint hook, configured build with trimpath and ldflags |
| .github/workflows/release.yml | New workflow for automated releases triggered by version tags or manual dispatch with snapshot support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| permissions: | ||
| contents: write | ||
| packages: write |
There was a problem hiding this comment.
The workflow grants 'packages: write' permission, but there's no configuration in .goreleaser.yaml for publishing to GitHub Container Registry or any package registry. If package publishing is not needed, this permission should be removed to follow the principle of least privilege. If it's intended for future use or Docker image publishing, consider adding a comment explaining its purpose.
| packages: write |
| flags: | ||
| - trimpath | ||
| ldflags: | ||
| - -s -w No newline at end of file |
There was a problem hiding this comment.
The removal of the archives section means GoReleaser will use default archive settings. This changes the naming convention from the previous custom template (e.g., 'mdextract_Linux_x86_64') to GoReleaser's default naming scheme. This is a breaking change for users who may have scripts or processes that depend on the specific archive naming pattern. Consider whether this breaking change is intentional, and if so, document it in release notes.
| - -s -w | |
| - -s -w | |
| archives: | |
| - id: default | |
| builds: | |
| - default | |
| # Preserve legacy naming like: mdextract_Linux_x86_64 | |
| name_template: >- | |
| mdextract_{{- if eq .Os "linux" -}}Linux{{- else -}}{{ .Os }}{{- end -}}_{{- if eq .Arch "amd64" -}}x86_64{{- else -}}{{ .Arch }}{{- end -}} | |
| format: tar.gz |
|
|
||
| builds: | ||
| - env: | ||
| - main: . |
There was a problem hiding this comment.
The removal of the goos specification (linux, windows, darwin) means the build will now use GoReleaser v2's defaults. In GoReleaser v2, if goos is not specified, it defaults to building for linux, darwin, and windows, which matches the previous configuration. However, it's worth explicitly verifying that the default architectures (likely amd64 and arm64) are acceptable, as the previous configuration had custom handling for amd64/386/arm architectures in the archives section.
| - main: . | |
| - main: . | |
| goos: | |
| - linux | |
| - windows | |
| - darwin | |
| goarch: | |
| - amd64 | |
| - arm64 | |
| - 386 | |
| - arm |
No description provided.