Add GitHub Actions workflow for building release binaries

This commit is contained in:
Overcuriousity
2025-12-11 21:34:18 +01:00
parent cfc71fc68d
commit 2964c27788

68
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,68 @@
name: Build Release Binaries
on:
release:
types: [created]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Linux binary
run: |
pyinstaller --onefile --name trace-linux main.py
- name: Upload Linux binary to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/trace-linux
asset_name: trace-linux
asset_content_type: application/octet-stream
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Windows executable
run: |
pyinstaller --onefile --name trace-windows main.py
- name: Upload Windows executable to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/trace-windows.exe
asset_name: trace-windows.exe
asset_content_type: application/octet-stream