From a716188087abb3bc28e03e647f3461fbf59ad01e Mon Sep 17 00:00:00 2001 From: Damien Jeandemange Date: Sun, 10 Nov 2024 23:55:33 +0100 Subject: [PATCH] Release CI Signed-off-by: Damien Jeandemange --- .github/workflows/ci.yml | 9 +++++++++ yagat.spec | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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}')