From 3752e8708cf859c2a5220ec5794f600039323f77 Mon Sep 17 00:00:00 2001 From: Daniel Franco Date: Wed, 13 Nov 2024 17:51:21 +0100 Subject: [PATCH] Add actions to create other OS binaries --- .github/workflows/create_linux_binary.yml | 1 - .github/workflows/create_macos_binary.yml | 34 +++++++++++++++++++++ .github/workflows/create_windows_binary.yml | 33 ++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/create_macos_binary.yml create mode 100644 .github/workflows/create_windows_binary.yml diff --git a/.github/workflows/create_linux_binary.yml b/.github/workflows/create_linux_binary.yml index b49ea67..48c156f 100644 --- a/.github/workflows/create_linux_binary.yml +++ b/.github/workflows/create_linux_binary.yml @@ -2,7 +2,6 @@ name: Create Linux binary -# Once a week (on Sunday) on: workflow_dispatch: release: diff --git a/.github/workflows/create_macos_binary.yml b/.github/workflows/create_macos_binary.yml new file mode 100644 index 0000000..8926aeb --- /dev/null +++ b/.github/workflows/create_macos_binary.yml @@ -0,0 +1,34 @@ +# Checks BiaPy code consistency + +name: Create macOS binary + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + run: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "pip" # caching pip dependencies + + - name: Installing BiaPy-GUI dependencies + run: pip install -r requirements.txt + + - name: Creating macOS binary + run: | + cp dist-macOS/main.spec main.spec + pyinstaller main.spec + + - name: Upload public folder to Google Drive + uses: Jodebu/upload-to-drive@master + with: + credentials: ${{ secrets.DRIVE_CREDENTIALS }} + target: dist/BiaPy.app + folder: ${{ secrets.FOLDER_FOR_NEW_BINARIES }} + name: BiaPy-macOS.zip diff --git a/.github/workflows/create_windows_binary.yml b/.github/workflows/create_windows_binary.yml new file mode 100644 index 0000000..27aaddb --- /dev/null +++ b/.github/workflows/create_windows_binary.yml @@ -0,0 +1,33 @@ +# Checks BiaPy code consistency + +name: Create Windows binary + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + run: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "pip" # caching pip dependencies + + - name: Installing BiaPy-GUI dependencies + run: pip install -r requirements.txt + + - name: Creating Linux binary + run: | + cp dist-win/main.spec main.spec + pyinstaller.exe main.spec + + - name: Upload public folder to Google Drive + uses: Jodebu/upload-to-drive@master + with: + credentials: ${{ secrets.DRIVE_CREDENTIALS }} + target: dist/BiaPy.exe + folder: ${{ secrets.FOLDER_FOR_NEW_BINARIES }}