mirror of
https://github.com/overcuriousity/trace.git
synced 2025-12-20 13:02:21 +00:00
72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
name: Build Release Binaries
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
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.13'
|
|
|
|
- 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.13'
|
|
|
|
- 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
|