Skip to content

Publish Linux and macOS release binaries from version tags - #112

Merged
leocavalcante merged 2 commits into
mainfrom
ci/release-binaries
Sep 29, 2026
Merged

leocavalcante merged 2 commits into
mainfrom
ci/release-binaries

Conversation

@leocavalcante

Copy link
Copy Markdown
Member

Summary

  • Add a release workflow that runs only on vMAJOR.MINOR.PATCH tags (optional pre-release suffix). A GitHub-hosted runner cross-compiles ValidGen for Linux and macOS, Intel (amd64) and Arm (arm64), writes SHA256SUMS, and attaches those files to the GitHub release for that tag.
  • Pull requests do not run this workflow, and this PR does not create a release.

Fixes #41

Test plan

  • Workflow YAML parses. Trigger is tag push only. Actions are actions/checkout@v4 and actions/setup-go@v4.
  • Tag check accepts v1.2.3 and v1.2.3-rc.1, and rejects path or shell metacharacters.
  • go build for linux/amd64, linux/arm64, darwin/amd64, and darwin/arm64 with CGO_ENABLED=0. file confirms ELF and Mach-O. Only the host linux/amd64 binary was executed.
  • CI build on this pull request

Release review

  • Permission is contents: write so gh can create or update the release. The token is github.token. There is no pull_request trigger, so a pull request cannot publish.
  • --verify-tag aborts if the version tag is not already on the remote, so the job does not create a tag from main.
  • Asset paths are dist/validgen_<tag>_{linux,darwin}_{amd64,arm64} plus dist/SHA256SUMS. The tag must match vMAJOR.MINOR.PATCH with an optional dot, plus, or hyphen suffix before it is used in a path. The upload list is those five files, not a directory glob.

Cross-compile amd64 and arm64 on a GitHub-hosted runner so a version tag can attach checksums and binaries to the release.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The workflow safely validates tags, builds all requested targets, verifies assets, and limits publishing to tag pushes.

Review effort: Balanced
Findings: None

What changed in this PR

Adds automated release publishing for issue #41, providing Linux and macOS binaries for Intel and Arm architectures.

Changes:

  • Builds four binaries from validated version tags.
  • Publishes binaries and SHA-256 checksums to GitHub Releases.
  • Documents release naming and supported architectures.
File Description
.github/​workflows/​release.yml Builds, validates, checksums, and publishes release assets.
README.md Documents release workflow and asset names.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@leocavalcante
leocavalcante merged commit 60834ae into main Sep 29, 2026
4 checks passed
@leocavalcante
leocavalcante deleted the ci/release-binaries branch September 29, 2026 21:18
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.

Provide binaries for Linux and macOS, Arm and Intel versions

2 participants