RsaCracker icon indicating copy to clipboard operation
RsaCracker copied to clipboard

Add release-binaries job to CI workflow for multi-platform releases

Open Copilot opened this issue 4 months ago • 0 comments

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: rsacracker at workflow level

  • New release-binaries job:

    • 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
  • Updated release job: Now depends on release-binaries in addition to publish-crates_io and publish-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-tools installation for static linking
  • Windows build uses msys2 shell (consistent with existing build job)
  • 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-binaries that 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 release job also need release-binaries so 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-binaries that 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 release job also need release-binaries so 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.

Copilot avatar Oct 28 '25 12:10 Copilot