Consolidate app creation using pyinstaller into a single step

This commit is contained in:
Debanjum Singh Solanky 2022-08-14 04:00:44 +03:00
parent 0a0a8d43e0
commit 3bc4d75ba9

View file

@ -32,18 +32,19 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install pyinstaller pip install pyinstaller
- name: Install Khoj Application - name: Install Khoj App
run: | run: |
pip install --upgrade . 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' if: matrix.os == 'macos-latest'
run: | run: |
# Set Target Architecture # Install Mac DMG Creator
sed -E -i "" "s/target_arch='(.*)'/target_arch='x86_64'/g" Khoj.spec
# Create Mac app
pyinstaller Khoj.spec
# Install Mac DMG Creator
brew install create-dmg brew install create-dmg
# Copy app to separate dmg folder # Copy app to separate dmg folder
mkdir -p dist/dmg && cp -r dist/Khoj.app dist/dmg mkdir -p dist/dmg && cp -r dist/Khoj.app dist/dmg
@ -59,35 +60,21 @@ jobs:
--app-drop-link 425 120 \ --app-drop-link 425 120 \
"dist/Khoj.dmg" \ "dist/Khoj.dmg" \
"dist/dmg/" "dist/dmg/"
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if : matrix.os == 'macos-latest' if : matrix.os == 'macos-latest'
with: with:
name: khoj.dmg name: khoj.dmg
path: dist/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 - uses: actions/upload-artifact@v3
if : matrix.os == 'windows-latest' if : matrix.os == 'windows-latest'
with: with:
name: khoj.exe name: khoj.exe
path: dist/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 - uses: actions/upload-artifact@v3
if : matrix.os == 'ubuntu-latest' if : matrix.os == 'ubuntu-latest'
with: with:
name: khoj.deb name: khoj
path: dist/Khoj.deb path: dist/Khoj