feat: add GoReleaser configuration for automated builds and releases#122
Conversation
|
Warning Review limit reached
More reviews will be available in 27 minutes and 13 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds a complete ChangesGoReleaser Configuration Template
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Pull request overview
Adds a GoReleaser configuration intended to support automated builds and GitHub releases for this repository/template.
Changes:
- Introduces a GoReleaser config file under
.github/workflows/. - Defines default build/archive/checksum/SBOM/release settings (with several placeholders and optional sections).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.goreleaser.yaml:
- Line 8: Replace all <REPLACE_ME> placeholders: set project_name to the actual
repo/project slug (replace project_name), set each builds[].binary to the
intended binary name(s) (replace builds[*].binary), and set release.github.name
to the owning GitHub org/user; then stop using a generic draft selection by
either setting release.draft: false in .goreleaser.yaml or updating the release
workflow logic to select the draft that matches the release tag/version (e.g.,
match release.tag_name or name), ensuring the workflow finds the draft for the
current tag instead of any draft with draft === true.
- Line 177: The GoReleaser config currently sets draft: true which conflicts
with the version-release.yml workflow that expects to control draft releases;
remove or change that setting so GoReleaser does not automatically mark releases
as drafts (e.g., delete or set the top-level draft key from true to false) to
avoid publishing the wrong draft; look for the 'draft' entry in the
.goreleaser.yaml configuration to update the release behavior.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 40c957dd-312f-483b-a886-7c12bf4729bc
📒 Files selected for processing (1)
.goreleaser.yaml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…into goreleaser
|
@CodeRabbit it will fail or ignore the whole if no main.go avaible in codebase?? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
cat .goreleaser.yamlLength of output: 7328 🏁 Script executed: #!/bin/bash
# Check if main.go or go.mod exist in the repo
echo "=== Checking for main.go ==="
fd -e go -g 'main.go' .
echo "=== Checking for go.mod ==="
fd -g 'go.mod' .
echo "=== Checking for any .go files ==="
fd -e go . | head -20Length of output: 373
There are actually two failure points in the current config for a non-Go repo:
GoReleaser treats missing build targets as hard errors — it does not have a "skip if file missing" mechanism. How to fix thisSince this is a template repo with no Go code, you should comment out the Go-specific sections: before:
hooks:
# - go mod tidy # [GO] Comment out — no Go project here
builds:
# [GO] — Comment out the entire go-build block if this isn't a Go project
# - id: go-build
# builder: go
# main: ./main.go
# ...Only the sections relevant to the actual project type should be left active. The non-Go build templates (Node, Python, Prebuilt) are already correctly commented out — the Go block needs the same treatment for repos without Go code. Alternatively, you could use |
Addressed Issues:
Fixes #(issue number)
Screenshots/Recordings:
Additional Notes:
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit