Skip to content

Add release workflow and binary download fallback#4

Merged
hammadtq merged 3 commits intomainfrom
feat/plugin-distribution
Apr 2, 2026
Merged

Add release workflow and binary download fallback#4
hammadtq merged 3 commits intomainfrom
feat/plugin-distribution

Conversation

@hammadtq
Copy link
Copy Markdown
Collaborator

@hammadtq hammadtq commented Apr 2, 2026

Summary

  • GitHub Actions release workflow (.github/workflows/release.yml): triggered on v* tags, runs tests + vet, cross-compiles for darwin/linux × amd64/arm64, generates SHA-256 checksums, and publishes a GitHub Release with all assets
  • Bootstrap download fallback (plugin/hooks/bootstrap.sh): when no binary and no Go toolchain are available, downloads the correct prebuilt binary from GitHub Releases, verifies its SHA-256 checksum, and caches it locally
  • make release target: mirrors CI locally for pre-tag validation
  • Marks roadmap item as done

Security

  • Downloaded binaries are checksum-verified; execution is refused if checksums can't be fetched or don't match
  • curl -fSL with connect/max timeouts prevents hanging or following to unexpected destinations

Test plan

  • bash -n plugin/hooks/bootstrap.sh — syntax check passes
  • go test ./... — all tests pass
  • make release — builds all 4 platform binaries + checksums.txt
  • Push a v0.1.0 tag after merge and verify GitHub Actions creates a release with 4 binaries + checksums.txt
  • Delete plugin/hooks/bin/, unset Go from PATH, run bootstrap.sh to verify download fallback

🤖 Generated with Claude Code

hammadtq and others added 3 commits April 1, 2026 17:23
Adds CI/CD to publish cross-compiled binaries on v* tags and a download
fallback in bootstrap.sh so users without Go can install the plugin from
GitHub Releases. Binaries are checksum-verified before execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Supports minimal Linux distros that only have sha256sum.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If grep finds no matching line in checksums.txt (empty file, wrong
filenames, truncated download), abort instead of executing an unverified
binary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hammadtq hammadtq merged commit ba0651a into main Apr 2, 2026
2 checks passed
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