From 269c1c74825a28db73001d2e157f3afbc2ef11cf Mon Sep 17 00:00:00 2001 From: hhh Date: Mon, 25 Dec 2023 15:31:50 +0200 Subject: [PATCH] Add build action --- .github/workflows/build.yml | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..22c24ef --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,69 @@ +name: Build and release new version +run-name: Building (${{ github.event_name }} by ${{ github.actor }}) +on: + workflow_dispatch: + push: + tags: + - 'v*' + +permissions: + contents: write + id-token: write + +jobs: + Create-Pyinstaller-Build: + name: Create build for ${{ matrix.os }} + runs-on: ${{ matrix.os }}-latest + strategy: + fail-fast: false + matrix: + os: [windows] + + steps: + - name: Clone repo + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install Poetry + run: pip install poetry + + - name: Install dependencies + run: poetry install + + - name: Create PyInstaller executable + run: poetry run pyinstaller D0CXUN7R4C3.spec + + - name: Upload build to storage + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-build + path: dist/* + + Upload-Release: + name: Upload release + runs-on: ubuntu-latest + needs: + - Create-Pyinstaller-Build + + steps: + - name: Check out repo + uses: actions/checkout@v4 + + - name: Download Windows build + uses: actions/download-artifact@v4 + with: + name: windows-build + path: dist/ + + - name: Display all files + run: ls -R + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: dist/* + fail_on_unmatched_files: true