diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d9e8c9..085d046 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,16 +24,19 @@ jobs: 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 } + - { os: ubuntu-22.04, label: linux-x64, ext: tar.gz, target: "" } + - { os: ubuntu-24.04-arm, label: linux-arm64, ext: tar.gz, target: "" } + # macOS x64 is cross-built on an Apple-Silicon runner (no scarce Intel runner). + - { os: macos-14, label: macos-x64, ext: tar.gz, target: x86_64-apple-darwin } + - { os: macos-14, label: macos-arm64, ext: tar.gz, target: "" } + - { os: windows-latest, label: windows-x64, ext: zip, target: "" } steps: - uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} - name: Cache cargo uses: actions/cache@v4 @@ -46,7 +49,13 @@ jobs: - name: Build (release) working-directory: neurosploit-rs - run: cargo build --release + shell: bash + run: | + if [ -n "${{ matrix.target }}" ]; then + cargo build --release --target "${{ matrix.target }}" + else + cargo build --release + fi - name: Resolve tag id: tag @@ -68,11 +77,13 @@ jobs: ./neurosploit run http://testphp.vulnweb.com/ --model anthropic:claude-opus-4-8 -v Or set NEUROSPLOIT_BASE to this folder and run neurosploit from anywhere. EOF + BINDIR="neurosploit-rs/target/release" + if [ -n "${{ matrix.target }}" ]; then BINDIR="neurosploit-rs/target/${{ matrix.target }}/release"; fi if [ "${{ runner.os }}" = "Windows" ]; then - cp neurosploit-rs/target/release/neurosploit.exe "dist/$NAME/" + cp "$BINDIR/neurosploit.exe" "dist/$NAME/" (cd dist && 7z a "${NAME}.zip" "$NAME" >/dev/null) else - cp neurosploit-rs/target/release/neurosploit "dist/$NAME/" + cp "$BINDIR/neurosploit" "dist/$NAME/" (cd dist && tar -czf "${NAME}.tar.gz" "$NAME") fi