Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build binaries & add as release assets | |
on: | |
release: | |
types: [created] | |
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@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
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.release.upload_url }} | |
asset_path: ${{ matrix.executable_path }} | |
asset_name: ${{ matrix.executable }} | |
asset_content_type: application/octet-stream |