diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9e3bbf..9d083b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,9 @@ on: required: true default: false type: boolean + release: + types: + - published permissions: { } @@ -67,3 +70,9 @@ jobs: with: name: yagat-${{ matrix.os }} path: dist/yagat* + + - name: Upload release package + if: ${{ github.event_name == 'release' }} + uses: softprops/action-gh-release@v2.0.9 + with: + files: yagat_*_.zip diff --git a/yagat.spec b/yagat.spec index 6c541ec..e75b16b 100644 --- a/yagat.spec +++ b/yagat.spec @@ -7,6 +7,7 @@ # SPDX-License-Identifier: MPL-2.0 # import platform +import shutil import sys sys.path.append('./') @@ -52,6 +53,7 @@ exe = EXE( codesign_identity=None, entitlements_file=None, ) +release_name=f'yagat_{__version__}_{platform.system()}' coll = COLLECT( exe, a.binaries, @@ -59,5 +61,7 @@ coll = COLLECT( strip=False, upx=True, upx_exclude=[], - name=f'yagat_{__version__}_{platform.system()}', + name=release_name, ) +print(f'Zipping release into {release_name}.zip') +shutil.make_archive(f'{release_name}', 'zip', f'dist/{release_name}')