Skip to content

Conversation

@nvandessel
Copy link
Owner

Summary

  • Replace manual matrix build with GoReleaser for automated cross-platform releases (6 binaries: linux/darwin/windows × amd64/arm64)
  • Add version injection via ldflags — git tags as source of truth, dev builds show version=dev with commit SHA and timestamp
  • Add version-bump.yml workflow dispatch for manual patch/minor/major version bumping that triggers release automatically
  • Add test-release.yml to validate GoReleaser config in snapshot mode on PRs

Changes

File Change
.goreleaser.yml New — core GoReleaser config (builds, archives, changelog, release)
.github/workflows/release.yml Replace matrix build with GoReleaser action
.github/workflows/version-bump.yml New — manual version bump trigger
.github/workflows/test-release.yml New — PR validation in snapshot mode
cmd/floop/main.go Version variables for ldflags injection
cmd/floop/cmd_version.go Display commit SHA and build date
Makefile Add ldflags for local builds
.gitignore Exclude dist/ directory
CONTRIBUTING.md Add release process section
docs/RELEASE_PROCESS.md New — comprehensive release guide

Validated locally

  • goreleaser check passes
  • goreleaser build --snapshot --clean builds all 6 binaries
  • goreleaser release --snapshot --clean --skip=publish produces archives + checksums
  • Version injection works: floop version dev (commit: 562a572, built: 2026-02-11T07:21:27Z)
  • Archives contain LICENSE, README, CHANGELOG, docs/
  • make build && ./floop version works with ldflags

Test plan

  • goreleaser check passes in CI
  • test-release workflow runs on this PR
  • Post-merge: trigger gh workflow run version-bump.yml -f bump=patch and verify release created
  • Download released binary and verify floop version output

🤖 Generated with Claude Code

Replace manual matrix build with GoReleaser for cross-platform releases.
Git tags become the version source of truth, injected via ldflags at build
time. Includes version-bump workflow dispatch, PR validation in snapshot
mode, and comprehensive release documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@greptile-apps
Copy link

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR replaces the previous GitHub Actions matrix build/release flow with a GoReleaser-driven pipeline. It adds a tag-triggered release.yml workflow that runs GoReleaser, a version-bump.yml manual workflow that creates/pushes v* tags to trigger releases, and a PR-only test-release.yml workflow that runs GoReleaser in snapshot mode for validation.

On the CLI side, floop version now reports version/commit/build date (and includes these fields in JSON output), with main.version, main.commit, and main.date intended to be injected via ldflags (wired for local builds via Makefile and for releases via .goreleaser.yml).

Two workflow correctness issues remain: the test workflow’s arm64 dist directory checks use inconsistent paths, and the version bump workflow’s tag parsing is brittle and can fail if tags aren’t strict numeric vMAJOR.MINOR.PATCH.

Confidence Score: 3/5

  • This PR is close to mergeable but has workflow correctness issues that can mis-validate builds and can break tagging-based releases under certain tag formats.
  • Core GoReleaser wiring and version injection look consistent, but (1) the PR validation workflow checks arm64 output directories using inconsistent names, making the validation misleading, and (2) the version bump workflow’s arithmetic parsing will fail if any v* tag is not strict numeric vMAJOR.MINOR.PATCH (including prerelease tags). Fixing these makes the release automation more robust.
  • .github/workflows/test-release.yml, .github/workflows/version-bump.yml

Important Files Changed

Filename Overview
.beads/issues.jsonl Adds a new open beads issue entry; no functional impact on release pipeline.
.github/workflows/release.yml Replaces matrix build/release with GoReleaser action triggered on v* tags; appears correct.
.github/workflows/test-release.yml Adds PR workflow to run GoReleaser snapshot build; directory checks for arm64 builds use inconsistent dist paths (missing _v1 suffix).
.github/workflows/version-bump.yml Adds manual workflow to create and push next version tag; parsing assumes strict numeric vMAJOR.MINOR.PATCH and can fail on malformed/prerelease tags.
.gitignore Ignores GoReleaser dist/ output directory.
.goreleaser.yml Introduces GoReleaser v2 config for cross-platform builds, archives, checksums, and GitHub changelog-based release notes.
CONTRIBUTING.md Documents automated release process and version bump workflow usage.
Makefile Adds ldflags-based version/commit/date injection for local builds.
cmd/floop/cmd_version.go Extends version command to print and JSON-emit commit/date metadata.
cmd/floop/main.go Defines version/commit/date variables intended for ldflags injection.
docs/RELEASE_PROCESS.md Adds detailed release workflow documentation and troubleshooting guidance.

Sequence Diagram

sequenceDiagram
  participant Maintainer
  participant GH as GitHub Actions
  participant Git as Repo/Tags
  participant GR as GoReleaser
  participant Rel as GitHub Releases

  Maintainer->>GH: workflow_dispatch (version-bump.yml: bump=patch|minor|major)
  GH->>Git: checkout (fetch-depth:0)
  GH->>Git: compute next version from latest v* tag
  GH->>Git: create annotated tag vX.Y.Z
  GH->>Git: push tag to origin
  Git-->>GH: tag push event (release.yml on push tags v*)
  GH->>Git: checkout (fetch-depth:0)
  GH->>GR: goreleaser release --clean
  GR->>GR: build 6 binaries + archives + checksums
  GR->>Rel: publish release + upload artifacts
  Rel-->>Maintainer: release available for download
Loading

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Feb 11, 2026

Additional Comments (2)

.github/workflows/test-release.yml
Incorrect dist folder checks

In snapshot builds you already reference ./dist/floop_linux_amd64_v1/..., but the arm64 directory checks look for dist/floop_linux_arm64, dist/floop_darwin_arm64, dist/floop_windows_arm64 (missing the _v1 suffix). As written, these checks will never succeed and make the workflow’s validation summary misleading even when arm64 binaries are built.

Also appears at .github/workflows/test-release.yml:130,136.


.github/workflows/version-bump.yml
Fragile semver parsing

LATEST_TAG is split on . and then used in Bash arithmetic. Any tag that isn’t exactly v<digits>.<digits>.<digits> (e.g. v1.2, v1.2.3-beta.1, or a malformed manual tag) will make MAJOR/MINOR/PATCH non-numeric/empty and cause the bump step to error out. This will block the release pipeline once such a tag exists.

Consider validating the parsed parts (3 components, numeric) and/or stripping pre-release/build metadata before arithmetic.

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.

1 participant