ci: ship prebuilt libraries on release#34
Conversation
Builds prebuilt static + shared libraries for all supported runtimes (linux-x64, macos-x64, macos-arm64, windows-x64) whenever a release is published, then attaches a single combined archive (headers + libs per runtime) to that release via gh release upload. Uses the existing cmake --install rules; packaging-only (no tests).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughA new GitHub Actions workflow ChangesRelease Artifacts Workflow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release-artifacts.yml:
- Around line 10-13: The workflow currently lacks explicit permission scoping
and relies on default token permissions for the build and package jobs. Add a
top-level `permissions` section after the `on` trigger with minimal read-only
permissions (typically `contents: read`). Then, in the `build` job, explicitly
set the same minimal permissions, and in the `package` job, elevate only the
necessary permissions (such as `contents: write` or `packages: write`) required
for that specific job's operations. This ensures each job operates with only the
minimum permissions it needs.
- Around line 10-13: Add a guard condition to enforce the vX.Y.Z tag format
before executing any packaging and upload steps in this workflow. The on.release
trigger currently accepts all published releases, so add a job-level or
step-level condition that validates the release tag matches the semantic
versioning pattern (e.g., using a regular expression check on
github.event.release.tag_name). If the tag does not match the vX.Y.Z format, the
job should fail fast or skip. This validation should be applied to all affected
sections mentioned in the workflow, including the main packaging logic and any
associated upload steps, so that only properly formatted version tags produce
artifacts.
- Around line 25-27: The os field for the macos-x64 matrix entry in the
release-artifacts.yml workflow currently uses the deprecated macos-13 runner
label, which was retired on December 4, 2025 and is no longer available as a
GitHub-hosted runner. Replace the macos-13 value with macos-15-intel to ensure
the macOS x64 build can run successfully.
- Line 33: The actions/checkout action on lines 33, 75, and 90 uses a floating
tag reference `@v4` which introduces supply-chain risk. Replace each occurrence of
uses: actions/checkout@v4 with the full 40-character commit SHA of that version,
optionally including a comment with the version tag for readability (e.g., uses:
actions/checkout@a1b2c3d4e5f6... # v4). This ensures the workflow is pinned to a
specific immutable commit rather than a tag that could be moved or compromised.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ed642412-ecc1-4b28-ac7f-ae5b77ed9c89
📒 Files selected for processing (1)
.github/workflows/release-artifacts.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
What
Adds a new `Release Artifacts` GitHub Actions workflow that builds prebuilt MafiaNet libraries for all supported runtimes whenever a release is published, and attaches a single combined archive to that release.
How
Trigger: `release: [published]` — fires on publishing a `vX.Y.Z` release.
`build` job (matrix, native runners, `fail-fast: false`):
Each runner configures Release, builds static + shared (CMake defaults), runs `cmake --install` into a staging prefix using the install rules already in `Source/CMakeLists.txt`, and uploads the staged tree.
`package` job (`needs: build`, `contents: write`): downloads all trees, assembles one layout (single shared `include/` + `lib//` with libs and CMake config; Windows `.dll`s folded in from `bin/`), adds a `README.txt` noting the OpenSSL runtime dependency, zips to `mafianet--all.zip`, and attaches it via `gh release upload --clobber`.
Notes
Summary by CodeRabbit
include/andlib/<runtime>/layout and how the libraries link to OpenSSL 3.