From e6faa1fe928a0883b3b265ea264b54f643dea681 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Sat, 13 May 2023 14:49:48 +0200 Subject: [PATCH 1/5] 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 From 0d116360ddf1eb56657f276067186e8ac19d7ad8 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Sat, 13 May 2023 14:51:37 +0200 Subject: [PATCH 2/5] Update package.yml forgot to add pyinstaller -.- --- .github/workflows/package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 6c960a7..416a913 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -23,6 +23,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install pyinstaller - name: Build and package run: | From 6673c439322076f12973906e3397e3da59d6c0a8 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Sat, 13 May 2023 14:58:22 +0200 Subject: [PATCH 3/5] Update package.yml Windows Only Test --- .github/workflows/package.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 416a913..1fb9850 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -6,10 +6,7 @@ on: jobs: package: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: windows-latest steps: - name: Set up Python uses: actions/setup-python@v2 @@ -26,14 +23,7 @@ jobs: pip install pyinstaller - 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 + run: pyinstaller --noconfirm --onefile --windowed StartUI.py - name: Upload artifacts uses: actions/upload-artifact@v2 From 92a8286cf34aa8bd5142e5a50b015e1e2a2185a9 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Sat, 13 May 2023 15:02:05 +0200 Subject: [PATCH 4/5] Update package.yml Added Linux to the Mix --- .github/workflows/package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 1fb9850..5c0ff20 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -6,7 +6,10 @@ on: jobs: package: - runs-on: windows-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, ubuntu-latest] steps: - name: Set up Python uses: actions/setup-python@v2 From 5663c18ae3805ee810c59314318ae2710c11edfc Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Sat, 13 May 2023 15:06:20 +0200 Subject: [PATCH 5/5] Update package.yml Changed the Output filename. Added MacOS --- .github/workflows/package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 5c0ff20..68d119c 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest] + os: [windows-latest, ubuntu-latest, macos-latest] steps: - name: Set up Python uses: actions/setup-python@v2 @@ -31,5 +31,6 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: packaged-files + name: ${{ matrix.os }}-binary path: dist # Assuming the packaged files are created in a 'dist' directory +