Skip to content

Build and Upload TOsk Binary #10

Build and Upload TOsk Binary

Build and Upload TOsk Binary #10

Workflow file for this run

name: Build and Upload TOsk Binary
on:
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., v1.0.6)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📆 Checkout repository
uses: actions/checkout@v3
- name: 🐳 Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: 🍎 Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
- name: ✨ Set up virtual environment and install PyInstaller
run: |
python3 -m venv venv
./venv/bin/pip install --upgrade pip
./venv/bin/pip install pyinstaller
- name: 🛠️ Build binary with PyInstaller
run: |
./venv/bin/pyinstaller --onefile \
--add-data "bin/viu:bin" \
--add-data "tosk.jpg:." \
main.py
mv dist/main dist/tosk-linux-x86_64
- name: 🚀 Upload TOsk Binary
uses: softprops/action-gh-release@v1
with:
files: dist/tosk-linux-x86_64
tag_name: ${{ github.event.inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}