From 3bc4d75ba90477563498ca83a4b0b6d2118bc2b9 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 14 Aug 2022 04:00:44 +0300 Subject: [PATCH] Consolidate app creation using pyinstaller into a single step --- .github/workflows/release.yml | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c9cfd86..5c0c425d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,18 +32,19 @@ jobs: python -m pip install --upgrade pip pip install pyinstaller - - name: Install Khoj Application + - name: Install Khoj App run: | pip install --upgrade . - - name: Create Mac App + - name: Package Khoj App + shell: bash + run: | + pyinstaller Khoj.spec + + - name: Create Mac App DMG if: matrix.os == 'macos-latest' run: | - # Set Target Architecture - sed -E -i "" "s/target_arch='(.*)'/target_arch='x86_64'/g" Khoj.spec - # Create Mac app - pyinstaller Khoj.spec - # Install Mac DMG Creator + # Install Mac DMG Creator brew install create-dmg # Copy app to separate dmg folder mkdir -p dist/dmg && cp -r dist/Khoj.app dist/dmg @@ -59,35 +60,21 @@ jobs: --app-drop-link 425 120 \ "dist/Khoj.dmg" \ "dist/dmg/" + - uses: actions/upload-artifact@v3 if : matrix.os == 'macos-latest' with: name: khoj.dmg path: dist/Khoj.dmg - - name: Create Windows App - if: matrix.os == 'windows-latest' - shell: bash - run: | - # Set Target Architecture - # sed -E -i "s/target_arch='(.*)'/target_arch='x86_64'/g" Khoj.spec - # Create Windows app - pyinstaller Khoj.spec - uses: actions/upload-artifact@v3 if : matrix.os == 'windows-latest' with: name: khoj.exe path: dist/Khoj.exe - - name: Create Debian App - if: matrix.os == 'ubuntu-latest' - run: | - # Set Target Architecture - sed -E -i "s/target_arch='(.*)'/target_arch='x86_64'/g" Khoj.spec - # Create Debian app - pyinstaller Khoj.spec - uses: actions/upload-artifact@v3 if : matrix.os == 'ubuntu-latest' with: - name: khoj.deb - path: dist/Khoj.deb \ No newline at end of file + name: khoj + path: dist/Khoj \ No newline at end of file