Add release-binaries job to CI workflow for multi-platform releases
Adds automated building and publishing of platform-specific release binaries suitable for cargo-binstall. On tag pushes, builds release artifacts for 5 targets and uploads them to GitHub Releases after all validation jobs pass.
Changes
-
Environment: Added
BINARY_NAME: rsacrackerat workflow level -
New
release-binariesjob:- Runs on tag pushes (
refs/tags/v*) after all validation jobs pass - Matrix builds for:
x86_64-unknown-linux-{gnu,musl},{x86_64,aarch64}-apple-darwin,x86_64-pc-windows-msvc - Packages single executable at top-level in tar.gz (Unix/macOS) or zip (Windows)
- Generates SHA256 checksums for each archive
- Uploads 10 files total (5 archives + 5 checksums) via
softprops/action-gh-release@v2
- Runs on tag pushes (
-
Updated
releasejob: Now depends onrelease-binariesin addition topublish-crates_ioandpublish-docker_hub
Release assets example
rsacracker-x86_64-unknown-linux-gnu.tar.gz
rsacracker-x86_64-unknown-linux-gnu.tar.gz.sha256
rsacracker-x86_64-unknown-linux-musl.tar.gz
rsacracker-x86_64-unknown-linux-musl.tar.gz.sha256
rsacracker-x86_64-apple-darwin.tar.gz
rsacracker-x86_64-apple-darwin.tar.gz.sha256
rsacracker-aarch64-apple-darwin.tar.gz
rsacracker-aarch64-apple-darwin.tar.gz.sha256
rsacracker-x86_64-pc-windows-msvc.zip
rsacracker-x86_64-pc-windows-msvc.zip.sha256
Notes
- MUSL target includes
musl-toolsinstallation for static linking - Windows build uses msys2 shell (consistent with existing
buildjob) - Archives are cargo-binstall compatible (single executable at top-level)
Original prompt
Add a release-binaries job to the main CI workflow (.github/workflows/ci.yml) so that on tag pushes the repository builds platform-specific release artifacts suitable for cargo-binstall and uploads them to the GitHub Release. Changes to make:
- Add BINARY_NAME env var (rsacracker) to the workflow env.
- Add a new job
release-binariesthat runs on tag pushes (same guard as existing publish jobs) and depends on the existing validation jobs (fmt, clippy, docs, tests, key-generation, ctf-challenges, coverage, build, docker-build). The job should:
- Build for a matrix of targets (gnu, musl, mac x86_64 & aarch64, windows x86_64).
- Package a single executable at top-level inside tar.gz (unix/mac) or zip (windows).
- Produce a .sha256 for each archive.
- Upload artifact files to the GitHub Release for the tag using softprops/action-gh-release.
- Make the existing
releasejob also needrelease-binariesso the release is created only after binaries are prepared and tests validated.The update must preserve the current checks (publish-crates_io, publish-docker_hub) and ensure releases are only created on tag pushes. The job should be conservative and include musl setup notes; it should run after the validation jobs to ensure tests passed before packaging.
Include the updated .github/workflows/ci.yml contents as the change.
This pull request was created as a result of the following prompt from Copilot chat.
Add a release-binaries job to the main CI workflow (.github/workflows/ci.yml) so that on tag pushes the repository builds platform-specific release artifacts suitable for cargo-binstall and uploads them to the GitHub Release. Changes to make:
- Add BINARY_NAME env var (rsacracker) to the workflow env.
- Add a new job
release-binariesthat runs on tag pushes (same guard as existing publish jobs) and depends on the existing validation jobs (fmt, clippy, docs, tests, key-generation, ctf-challenges, coverage, build, docker-build). The job should:
- Build for a matrix of targets (gnu, musl, mac x86_64 & aarch64, windows x86_64).
- Package a single executable at top-level inside tar.gz (unix/mac) or zip (windows).
- Produce a .sha256 for each archive.
- Upload artifact files to the GitHub Release for the tag using softprops/action-gh-release.
- Make the existing
releasejob also needrelease-binariesso the release is created only after binaries are prepared and tests validated.The update must preserve the current checks (publish-crates_io, publish-docker_hub) and ensure releases are only created on tag pushes. The job should be conservative and include musl setup notes; it should run after the validation jobs to ensure tests passed before packaging.
Include the updated .github/workflows/ci.yml contents as the change.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.