ci(release): add goreleaser config and GitHub Actions workflow#113
ci(release): add goreleaser config and GitHub Actions workflow#113feloy merged 2 commits intokortex-hub:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughAdds automated release infrastructure: a tag-triggered GitHub Actions workflow ( Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub (repo)
participant Runner as Actions Runner
participant GRA as GoReleaser Action
participant GHRel as GitHub Releases
Dev->>GH: push tag (v*)
GH->>Runner: trigger `release` workflow
Runner->>Runner: checkout (fetch-depth:0), setup Go
Runner->>GRA: run goreleaser action (release --clean)
GRA->>GHRel: create artifacts and publish release (uses GITHUB_TOKEN)
GHRel-->>Dev: release published
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release.yml:
- Around line 46-47: Replace the non-deterministic "version: latest" entry in
the release workflow with a pinned GoReleaser Action version to ensure
reproducible releases; update the workflow step that currently sets "version"
alongside "args: release --clean" to a specific tag (e.g., a concrete vX.Y.Z) or
a stable range like "~> v2" per the goreleaser/goreleaser-action docs so the
action no longer floats to the latest release.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ce2810a0-bcdd-46fb-bf59-0faeb1d471ad
📒 Files selected for processing (2)
.github/workflows/release.yml.goreleaser.yaml
.goreleaser.yaml
Outdated
| checksum: | ||
| name_template: checksums.txt | ||
| algorithm: sha256 |
There was a problem hiding this comment.
question: do we need checksums ?
to me it was like old school way of providing checksums but for example on GitHub since last year checksum are provided by default by GitHub release
There was a problem hiding this comment.
I removed it. You're right, GitHub natively provides SHA-256 digests for release assets.
|
In other project I have these lines in .goreleaser.yaml: This project is using modules, I suppose they are useful (this will check that the modules dependencies are up to date) |
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
question: why do we need a depth of 0 ?
There was a problem hiding this comment.
Is needed since goreleaser needs the full git history to work properly. https://goreleaser.com/customization/ci/actions/
Enable automated cross-platform binary releases triggered by version tags, so consumers can download pre-built binaries instead of building from source. Closes kortex-hub#21 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Marcel Bertagnini <mbertagn@redhat.com>
Address PR review feedback: pin goreleaser to ~> v2.14 for reproducible builds, add go mod tidy before hook, and drop checksums.txt since GitHub natively provides SHA-256 digests for release assets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Marcel Bertagnini <mbertagn@redhat.com>
f5ddef2 to
cc5ee70
Compare
Enable automated cross-platform binary releases triggered by version tags, so consumers can download pre-built
binaries instead of building from source.
.goreleaser.yamlto cross-compilekortex-clifor 6 targets: linux/darwin/windows x amd64/arm64.github/workflows/release.ymltriggered onv*tags to automate GitHub Releases with goreleaserpkg/version.Version.tar.gzfor linux/macOS and.zipfor Windows, with SHA-256 checksumsCloses #21