Skip to content

feat: add GoReleaser configuration for automated builds and releases#122

Merged
Zahnentferner merged 6 commits into
AOSSIE-Org:mainfrom
kpj2006:goreleaser
May 29, 2026
Merged

feat: add GoReleaser configuration for automated builds and releases#122
Zahnentferner merged 6 commits into
AOSSIE-Org:mainfrom
kpj2006:goreleaser

Conversation

@kpj2006
Copy link
Copy Markdown
Member

@kpj2006 kpj2006 commented May 26, 2026

Addressed Issues:

Fixes #(issue number)

Screenshots/Recordings:

Additional Notes:

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

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

  • Chores
    • Configured automated release builds and distribution across Linux, macOS, and Windows platforms with checksums and source archives included.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Warning

Review limit reached

@kpj2006, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fa1783fe-1dde-44bd-9efd-5dedee0c3911

📥 Commits

Reviewing files that changed from the base of the PR and between 629eaff and 6764dc6.

📒 Files selected for processing (1)
  • .goreleaser.yaml

Walkthrough

This PR adds a complete .goreleaser.yaml configuration template for GoReleaser v2. The file establishes a default Go binary build pipeline targeting multiple platforms, configures artifact packaging with checksums and SBOMs, sets up GitHub release workflow automation, and provides commented-out templates for alternative project types (Node, Python, Docker) and distribution channels (npm, web3).

Changes

GoReleaser Configuration Template

Layer / File(s) Summary
Template header and Go build configuration
.goreleaser.yaml
Header comments with GoReleaser documentation links and validation instructions; top-level release config (version, project_name), before hook for go mod tidy, GITHUB_TOKEN environment variable setup, and primary Go build definition with output binary name, platform/architecture targets (linux/darwin/windows), CGO disabled, and ldflags embedding version/commit/date.
Artifact packaging and generation
.goreleaser.yaml
Archive packaging with platform-specific templates (directory wrapping, Windows zip format override), included files (LICENSE, README, CHANGELOG); sha256 checksum generation, source archive creation at release tags, SBOM generation via syft, and commented-out cosign signing scaffolding.
GitHub release workflow and output settings
.goreleaser.yaml
GitHub release metadata with owner/name placeholders, draft mode enabled, automatic prerelease detection from version strings, release name templating; snapshot version templating for local development builds without git tags; report_sizes enabled to print artifact size summary after builds.
Alternative build and publish templates
.goreleaser.yaml
Commented-out configuration templates for Node (npm builds), Python (uv/poetry packaging), prebuilt binary imports, Docker image builds, npm registry publishing, web3 extra-files with contract compilation hooks, and monorepo configuration examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • Zahnentferner

Poem

🐰 A goreleaser config springs to life,
With Go builds and archives, no strife!
Linux, Darwin, Windows all packed tight,
Checksums and SBOMs shining bright—
Templates await for projects to compile! 🚀

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a GoReleaser configuration file for automated builds and releases, which matches the raw summary content.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added no-issue-linked PR is not linked to any issue backend Changes to backend code ci-cd CI/CD pipeline changes configuration Configuration file changes github-actions GitHub Actions workflow changes size/M Medium PR (51-200 lines changed) repeat-contributor PR from an external contributor who already had PRs merged needs-review labels May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Messages
📖

⚠️ PR Template Check

These are non-blocking, but please fix:

  • Please replace the placeholder Fixes #(issue number) with the actual issue number (e.g. Fixes #42).

  • Some required checklist items are not completed:

  • My PR addresses a single issue

Generated by 🚫 dangerJS against 6764dc6

Copy link
Copy Markdown

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

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.

Comment thread .goreleaser.yaml
Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml Outdated
@github-actions github-actions Bot removed github-actions GitHub Actions workflow changes ci-cd CI/CD pipeline changes labels May 26, 2026
@kpj2006
Copy link
Copy Markdown
Member Author

kpj2006 commented May 26, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between c4ba896 and 629eaff.

📒 Files selected for processing (1)
  • .goreleaser.yaml

Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml Outdated
kpj2006 and others added 3 commits May 26, 2026 13:23
@kpj2006
Copy link
Copy Markdown
Member Author

kpj2006 commented May 26, 2026

@CodeRabbit it will fail or ignore the whole if no main.go avaible in codebase??

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
cat .goreleaser.yaml

Length 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 -20

Length of output: 373



@kpj2006 It will fail — not ignore it.

There are actually two failure points in the current config for a non-Go repo:

  1. before.hooks: go mod tidy — This runs first and will immediately error out because there is no go.mod in the repository (confirmed: no .go files exist at all in this repo).

  2. builds[0]: main: ./main.go — Even if the hook were skipped, GoReleaser would then invoke go build ./main.go, which would fail with a "no such file" error.

GoReleaser treats missing build targets as hard errors — it does not have a "skip if file missing" mechanism.


How to fix this

Since 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 goreleaser check locally (as the file's own comment at line 3 suggests) to validate the config before merging.

@Zahnentferner Zahnentferner merged commit 549c2f8 into AOSSIE-Org:main May 29, 2026
7 checks passed
@kpj2006 kpj2006 deleted the goreleaser branch May 30, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Changes to backend code configuration Configuration file changes needs-review no-issue-linked PR is not linked to any issue repeat-contributor PR from an external contributor who already had PRs merged size/M Medium PR (51-200 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants