From e6faa1fe928a0883b3b265ea264b54f643dea681 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Sat, 13 May 2023 14:49:48 +0200 Subject: [PATCH] Create package.yml Hopefully, automatically builds the binaries. --- .github/workflows/package.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/package.yml diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..6c960a7 --- /dev/null +++ b/.github/workflows/package.yml @@ -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