Rim f827a18f2f
Some checks failed
Build Python Executable / build (push) Failing after 14s
feat(): add build.yml
2025-02-28 17:55:23 -05:00

51 lines
1.3 KiB
YAML

name: Build Python Executable
on:
push:
branches:
- main
schedule:
- cron: "*/1 * * * *" # Runs every 1 minute
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Python 3.9.13
uses: actions/setup-python@v4
with:
python-version: "3.9.13"
- name: Install Wine
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine64 wine32
- name: Create virtual environment
run: |
python3.9 -m venv venv
source venv/bin/activate
python --version
- name: Install dependencies
run: |
pip install aiohttp
pip install zope.interface
pip install pip wheel build ./deps/cod_api-2.0.2-py3-none-any.whl
pip install pyinstaller==6.0.0
- name: Build Windows Executable with Wine
run: |
wine pyinstaller cod_api_tool.py --name cod_api_tool.exe --noconfirm --onefile --console --distpath bin/build --add-data=deps/frequencies.json:charset_normalizer/assets --add-data=data/replacements.json:data
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: cod_api_tool
path: bin/build/cod_api_tool.exe