From a10a2ea3adc9f75242703807fbe5e117bf69b006 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 14 Aug 2022 03:38:29 +0300 Subject: [PATCH] Run job matrix to wrap Khoj into app installers for Debian, Windows too --- .github/workflows/release.yml | 36 ++++++++++++++++++++++++++++++++--- Khoj.spec | 2 +- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e011274..e058513c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,9 @@ on: jobs: publish: - name: Create Mac App - runs-on: macos-latest + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v3 @@ -36,6 +37,7 @@ jobs: pip install --upgrade . - name: Package Mac App + if: matrix.os == 'macos-latest' run: | # Set Target Architecture sed -E -i "" "s/target_arch='(.*)'/target_arch='x86_64'/g" Khoj.spec @@ -56,6 +58,34 @@ jobs: "dist/Khoj.dmg" \ "dist/dmg/" - uses: actions/upload-artifact@v3 + if : matrix.os == 'macos-latest' with: name: khoj.dmg - path: dist/Khoj.dmg \ No newline at end of file + path: dist/Khoj.dmg + + - name: Package 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: Package Ubuntu 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 diff --git a/Khoj.spec b/Khoj.spec index a2470734..3697f32d 100644 --- a/Khoj.spec +++ b/Khoj.spec @@ -48,7 +48,7 @@ exe = EXE( console=False, disable_windowed_traceback=False, argv_emulation=False, - target_arch='arm64', + target_arch='x86_64', codesign_identity=None, entitlements_file=None, icon='src/interface/web/assets/icons/favicon.icns',