From db5228eb4ce497ac362862ebfa5d90f53dad997a Mon Sep 17 00:00:00 2001 From: Drsanwujiang Date: Wed, 27 Dec 2023 16:10:04 +0800 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66c761a..0adf8f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,11 @@ name: Build Bundle on: - [push, release] + push: + branches: + - main + release: + types: + - published jobs: build: runs-on: windows-latest @@ -26,8 +31,19 @@ jobs: run: echo version=$(poetry version --short) >> "$GITHUB_OUTPUT" - name: Build bundle run: poetry run pyinstaller main.spec - - name: Upload artifact + - name: Upload bundle to artifact uses: actions/upload-artifact@v4 with: name: google-cloud-gui_${{ steps.show-version.outputs.version }} - path: dist/google-cloud-gui \ No newline at end of file + path: dist/google-cloud-gui + - name: Create release bundle + if: ${{ github.event_name == 'release' }} + uses: TheDoctor0/zip-release@0.7.6 + with: + filename: google-cloud-gui_${{ steps.show-version.outputs.version }}.zip + path: dist/google-cloud-gui + - name: Upload bundle to release + if: ${{ github.event_name == 'release' }} + uses: svenstaro/upload-release-action@v2 + with: + file: google-cloud-gui_${{ steps.show-version.outputs.version }}.zip \ No newline at end of file