From ae5bb247a3a33279851781189ad440ab656a93df Mon Sep 17 00:00:00 2001 From: CyberSecurityUP Date: Fri, 26 Jun 2026 14:25:22 -0300 Subject: [PATCH] ci: cross-platform release builds (linux x64/arm64, macos x64/arm64, windows) GitHub Actions workflow that, on a pushed v* tag (or manual dispatch), builds a self-contained NeuroSploit (binary + agents_md/) for every OS/arch and uploads the archives to the matching release. macOS builds are also attached manually. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 85 +++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7d9e8c9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,85 @@ +name: Release builds + +# Builds self-contained NeuroSploit binaries for every OS/arch and uploads them +# to the matching GitHub Release. Fires automatically on a pushed `v*` tag, or +# manually via "Run workflow" (provide the tag). + +on: + push: + tags: ["v*"] + workflow_dispatch: + inputs: + tag: + description: "Release tag to build & attach (e.g. v3.5.2)" + required: true + +permissions: + contents: write + +jobs: + build: + name: ${{ matrix.label }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - { os: ubuntu-22.04, label: linux-x64, ext: tar.gz } + - { os: ubuntu-24.04-arm, label: linux-arm64, ext: tar.gz } + - { os: macos-13, label: macos-x64, ext: tar.gz } + - { os: macos-14, label: macos-arm64, ext: tar.gz } + - { os: windows-latest, label: windows-x64, ext: zip } + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + neurosploit-rs/target + key: ${{ matrix.label }}-cargo-${{ hashFiles('neurosploit-rs/Cargo.lock') }} + + - name: Build (release) + working-directory: neurosploit-rs + run: cargo build --release + + - name: Resolve tag + id: tag + shell: bash + run: echo "tag=${{ github.event.inputs.tag || github.ref_name }}" >> "$GITHUB_OUTPUT" + + - name: Package + shell: bash + run: | + set -e + TAG="${{ steps.tag.outputs.tag }}" + NAME="neurosploit-${TAG}-${{ matrix.label }}" + mkdir -p "dist/$NAME" + cp -R agents_md "dist/$NAME/" + cat > "dist/$NAME/README.txt" </dev/null) + else + cp neurosploit-rs/target/release/neurosploit "dist/$NAME/" + (cd dist && tar -czf "${NAME}.tar.gz" "$NAME") + fi + + - name: Upload to release + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + TAG="${{ steps.tag.outputs.tag }}" + gh release upload "$TAG" dist/neurosploit-*.${{ matrix.ext }} --clobber