From 4e54a9b4968577de258206f5d2d4a1cb18f69a23 Mon Sep 17 00:00:00 2001 From: Soxoj <31013580+soxoj@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:27:28 +0100 Subject: [PATCH] Put Windows executable in Releases for each dev and main commit (#1929) --- .github/workflows/pyinstaller.yml | 44 ++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pyinstaller.yml b/.github/workflows/pyinstaller.yml index e7c97e3e..614376ae 100644 --- a/.github/workflows/pyinstaller.yml +++ b/.github/workflows/pyinstaller.yml @@ -6,17 +6,49 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: PyInstaller Windows + - name: Checkout + uses: actions/checkout@v4 + + - name: PyInstaller Windows Build uses: JackMcKew/pyinstaller-action-windows@main with: path: pyinstaller - - uses: actions/upload-artifact@v4 + - name: Upload PyInstaller Binary to Workflow as Artifact + uses: actions/upload-artifact@v4 + with: + name: maigret_standalone_win32 + path: pyinstaller/dist/windows + + - name: Download PyInstaller Binary + uses: actions/download-artifact@v4 with: name: maigret_standalone_win32 - path: pyinstaller/dist/windows # or path/to/artifact + + - name: Create New Release and Upload PyInstaller Binary to Release + uses: ncipollo/release-action@v1.14.0 + id: create_release + with: + allowUpdates: true + draft: false + prerelease: false + artifactErrorsFailBuild: true + makeLatest: true + replacesArtifacts: true + artifacts: maigret_standalone.exe + name: Development Windows Release [${{ github.ref_name }}] + tag: ${{ github.ref_name }} + if: github.ref_name == 'dev' + body: | + This is a development release built from the **dev** branch. + It exists for the debugging purposes, so it may be unstable. + Please, use [the development release](https://github.com/soxoj/maigret/releases/tag/main) build from the **main** branch. + else: | + body: | + This is a development release built from the **main** branch. + Download the attached file `maigret_standalone.exe` to get the Windows executable. + Video guide: https://youtu.be/qIgwTZOmMmM + env: + GITHUB_TOKEN: ${{ github.token }}