Skip to content

v1.0.0

v1.0.0 #19

Workflow file for this run

name: Publish
on:
release:
types: [published]
concurrency:
group: release-${{ github.event.release.tag_name }}
cancel-in-progress: false
jobs:
build:
name: Build Plugin (${{ matrix.os }}, py${{ matrix.python }}, ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
python: "3.10"
arch: arm64
package-name: macos_arm64
- os: macos-15-intel
python: "3.10"
arch: x86_64
package-name: macos_x86_64
- os: windows-latest
python: "3.10"
arch: x86_64
package-name: windows_x86_64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install build tools
run: python -m pip install --upgrade pip setuptools wheel
- name: Build vendor dependencies
run: |
rm -rf images
mkdir -p reai_toolkit/vendor
uv pip install . --target reai_toolkit/vendor --no-cache-dir
rm -rf reai_toolkit/vendor/reai_toolkit
rm -rf reai_toolkit/vendor/reai_toolkit-*.dist-info
shell: bash
- name: Verify vendor folder contents
run: |
echo "Listing vendor packages:"
find reai_toolkit/vendor -maxdepth 2 -type d -print0 | head -n 50
shell: bash
- name: Package plugin for release (cross-platform)
run: |
python - <<'PY'
import zipfile, os
from pathlib import Path
os.makedirs("dist", exist_ok=True)
zip_path = f"dist/reveng_binary_ninja_plugin_${{ matrix.package-name }}.zip"
with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zf:
# Add all files from reai_toolkit/ to root of zip
for root, dirs, files in os.walk("reai_toolkit"):
for file in files:
file_path = os.path.join(root, file)
# Archive name is relative to reai_toolkit (removes the reai_toolkit/ prefix)
arcname = os.path.relpath(file_path, ".")
zf.write(file_path, arcname)
PY
shell: bash
- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: reveng_binary_ninja_plugin_${{ matrix.package-name }}
path: dist/*.zip
attach:
name: Attach Artifacts to GitHub Release
runs-on: macos-latest
needs: build
steps:
- name: Download built artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: List artifacts
run: ls -R dist
- name: Attach to published release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.release.tag_name }}
name: ${{ github.event.release.name }}
body: |
RevEng.AI Binary Ninja Plugin
Extract into your Binary Ninja plugins folder.
files: dist/**/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}