Skip to content

release: add goreleaser config + release workflow#104

Merged
winebarrel merged 1 commit into
mainfrom
feat-goreleaser
May 6, 2026
Merged

release: add goreleaser config + release workflow#104
winebarrel merged 1 commit into
mainfrom
feat-goreleaser

Conversation

@winebarrel

Copy link
Copy Markdown
Owner

Summary

Set up release plumbing so a `v*..` tag publishes binaries + packages. Mirrors the qube setup.

Changes

`.goreleaser.yml`

  • builds: `./cmd/myschema`, linux + darwin, `CGO_ENABLED=0`, version stamped via `-ldflags -X main.version={{.Version}}` (matches the existing `var version = "dev"` in `cmd/myschema/main.go`).
  • homebrew_casks: pushes a cask formula to the existing `winebarrel/homebrew-myschema` tap. Post-install hook runs `xattr -dr com.apple.quarantine` on macOS so the unsigned binary opens without Gatekeeper friction.
  • nfpms: `.apk` / `.deb` / `.rpm` artefacts named `myschema__` for Linux package managers.

`.github/workflows/release.yml`

Fires on `v*..` tags. Uses the same pinned SHAs as qube for `actions/checkout`, `actions/setup-go`, and `goreleaser/goreleaser-action`. Pushes via the `GORELEASER_GITHUB_TOKEN` secret — needs to be configured on the repo before the first release.

`TODO.md`

Drops the corresponding `.goreleaser.yml` entry from the Low section.

Test plan

  • `goreleaser check` validates the config locally.
  • First tag publish will exercise the workflow end-to-end.

🤖 Generated with Claude Code

Mirror the qube setup so tagged releases publish:

- linux + darwin binaries (CGO_ENABLED=0, version from -ldflags
  -X main.version=, matching cmd/myschema/main.go's existing var)
- Homebrew cask via the existing winebarrel/homebrew-myschema tap.
  Post-install hook runs xattr -dr com.apple.quarantine on macOS
  so the unsigned binary opens without Gatekeeper friction.
- nfpms artefacts (.apk / .deb / .rpm) for Linux package managers,
  filename `myschema_<ver>_<arch>` matching qube's convention.

The release workflow fires on `v*.*.*` tags, uses the same pinned
SHAs qube uses for actions/checkout, actions/setup-go, and
goreleaser-action, and pushes via GORELEASER_GITHUB_TOKEN secret
(needs to be configured on the repo).

TODO.md drops the corresponding "Low" entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 06:35
@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.86%. Comparing base (32608cf) to head (e901534).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #104   +/-   ##
=======================================
  Coverage   86.86%   86.86%           
=======================================
  Files          30       30           
  Lines        3357     3357           
=======================================
  Hits         2916     2916           
  Misses        270      270           
  Partials      171      171           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

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 adds release automation so tagging v*.*.* can publish GitHub release artifacts (binaries + packages) using GoReleaser, and removes the corresponding TODO item.

Changes:

  • Add .goreleaser.yml to build cmd/myschema, stamp version via -ldflags, and publish Homebrew cask + Linux packages (apk/deb/rpm).
  • Add a GitHub Actions release workflow to run GoReleaser on version tags.
  • Update TODO.md to remove the GoReleaser config item.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
TODO.md Removes the now-implemented GoReleaser item from the Low-priority TODO list.
.goreleaser.yml Introduces GoReleaser configuration for binaries, checksums, Homebrew cask publishing, and nfpm packaging.
.github/workflows/release.yml Adds a tag-triggered workflow to run GoReleaser and publish release artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
@winebarrel winebarrel merged commit 87e3dd5 into main May 6, 2026
9 checks passed
@winebarrel winebarrel deleted the feat-goreleaser branch May 6, 2026 06:39
winebarrel added a commit that referenced this pull request May 6, 2026
Mirror pistachio's Installation section: a Homebrew one-liner
(via the winebarrel/homebrew-myschema tap added by the
goreleaser workflow in PR #104) and a "download from Releases"
fallback. Slot between the demo image and the Usage section so
new readers see install before usage examples.

The Homebrew tap will get its first formula on the first
v*.*.* tag — the install command is documented here in advance
so the README is ready when releases start.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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