Skip to content

trigger_binary_build #3

trigger_binary_build

trigger_binary_build #3

Workflow file for this run

name: Build binaries & add as release assets
on:
repository_dispatch:
types: [trigger_binary_build]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
include:
- os: ubuntu-20.04
executable: opshin-linux
executable_path: ./dist/opshin
- os: macos-latest
executable: opshin-macos
executable_path: ./dist/opshin
- os: windows-latest
executable: opshin-windows.exe
executable_path: .\dist\opshin.exe
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
shell: bash
- name: Build Binary
run: |
pip install ./ # Ensure your package and its dependencies are installed
pyinstaller --name opshin --collect-all pycardano --collect-all blockfrost --collect-all opshin --noconfirm --onefile ./scripts/run_opshin.py
shell: bash
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.client_payload.upload_url }}
asset_path: ${{ matrix.executable_path }}
asset_name: ${{ matrix.executable }}
asset_content_type: application/octet-stream