Commit Graph

2 Commits

Author SHA1 Message Date
Hongming Wang
76569b7c9e ci(release): switch release.yml to GoReleaser + race-detector tests
After this PR the release pipeline produces a real out-of-box install
story for molecule-cli — multi-OS binaries with checksums, archived
with shell completions, plus a CI gate that catches races in the
new connect orchestrator.

What changed:

- `.github/workflows/release.yml`
  * Vet now scans `./...` (was: three packages); silently let
    regressions in internal/backends/ + internal/connect/ ship.
  * Test now runs `-race -count=1 ./...` (was: just `cmd/molecule`
    without race). The connect orchestrator runs heartbeat + poll
    goroutines concurrently — a race here would corrupt cursor state.
  * Release job switches from inline `go build` per matrix entry to
    `goreleaser release --clean`. Same multi-OS output, plus
    auto-generated changelog, checksum files, and one config file
    that future channels (brew tap, scoop, choco) hook into without
    new workflow steps.
  * `goreleaser check` runs first so a broken .goreleaser.yaml fails
    fast at validation, not partway through a build.
  * Path filter expanded so .goreleaser.yaml edits trigger CI.

- `.goreleaser.yaml`
  * Pre-generate shell completions in the before: hook so the archive
    can include them. (`molecule completion <shell>` still works at
    runtime — this just ships the files for users who prefer a
    drop-in setup.)
  * Update archive `formats:` (plural) for goreleaser v2 — `format:`
    was deprecated.
  * Drop the redundant per-archive checksum block; the top-level
    `checksum:` covers it.
  * Header comment rewritten to reflect that this is now the
    canonical release path (was: "wire it up when ready").

Test plan:

- [x] yaml parses for both files
- [x] `go test -race -count=1 ./...` green
- [ ] CI on this PR exercises the new test job (vet ./..., -race ./...)
- [ ] First tag push (v0.1.0) exercises the release job

After merge, cutting v0.1.0 is:
  git tag v0.1.0 && git push origin v0.1.0
  # → Release artifacts auto-built and published to GitHub Releases

This is M1.4 of [RFC #10](https://github.com/Molecule-AI/molecule-cli/issues/10).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 05:30:31 -07:00
29e025129f chore(cli): add .goreleaser.yaml and resolve KI-004
Add .goreleaser.yaml with the correct module root (dir: .) and main
package path (./cmd/molecule) so the first v* tag release produces
valid artifacts for all 6 targets. Mark KI-004 as resolved in
known-issues.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 10:33:08 +00:00