Create package.yml

Hopefully, automatically builds the binaries.
This commit is contained in:
Pakobbix 2023-05-13 14:49:48 +02:00 committed by GitHub
parent 090359d5a3
commit e6faa1fe92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

41
.github/workflows/package.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Package Release
on:
push:
branches:
- main
jobs:
package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build and package
run: |
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then
pyinstaller --noconfirm --onefile --windowed StartUI.py
elif [ ${{ matrix.os }} == 'windows-latest' ]; then
pyinstaller --noconfirm --onefile --windowed StartUI.py
elif [ ${{ matrix.os }} == 'macos-latest' ]; then
pyinstaller --noconfirm --onefile --windowed StartUI.py
fi
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: packaged-files
path: dist # Assuming the packaged files are created in a 'dist' directory