mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-11 16:23:02 +01:00
Package Khoj as Debian app in Github Release Workflow
This commit is contained in:
parent
d815e0d115
commit
fed0b591af
3 changed files with 32 additions and 2 deletions
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
|
@ -53,6 +53,29 @@ jobs:
|
|||
"dist/Khoj.dmg" \
|
||||
"dist/dmg/"
|
||||
|
||||
- name: Create Debian Package
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
# Install Debian Packager
|
||||
sudo apt install ruby
|
||||
get install fpm --user-install
|
||||
|
||||
# Copy app files into expected output directory structure
|
||||
mkdir -p package/opt package/usr/share/applications package/usr/share/icons/hicolor/128x128/apps
|
||||
cp -r dist/Khoj package/opt/Khoj
|
||||
cp src/interface/web/assets/icons/favicon-128x128.png package/usr/share/icons/hicolor/128x128/apps/Khoj.png
|
||||
cp Khoj.desktop package/usr/share/applications
|
||||
|
||||
# Fix permissions to be usable by non-root users
|
||||
find package/opt/Khoj -type f -exec chmod 644 -- {} +
|
||||
find package/opt/Khoj -type d -exec chmod 755 -- {} +
|
||||
find package/usr/share -type f -exec chmod 644 -- {} +
|
||||
chmod +x package/opt/Khoj/Khoj
|
||||
|
||||
# Package the app
|
||||
fpm -s dir -t deb -n Khoj --version "$GITHUB_REF_NAME" -p dist/Khoj.deb
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if : matrix.os == 'macos-latest'
|
||||
with:
|
||||
|
@ -68,5 +91,5 @@ jobs:
|
|||
- uses: actions/upload-artifact@v3
|
||||
if : matrix.os == 'ubuntu-latest'
|
||||
with:
|
||||
name: khoj
|
||||
path: dist/Khoj
|
||||
name: khoj.deb
|
||||
path: dist/Khoj.deb
|
7
Khoj.desktop
Normal file
7
Khoj.desktop
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Khoj
|
||||
Comment=A natural language search engine for your personal notes, transactions and images.
|
||||
Path=/opt/Khoj
|
||||
Exec=/opt/Khoj/Khoj
|
||||
Icon=Khoj
|
BIN
src/interface/web/assets/icons/favicon-128x128.png
Normal file
BIN
src/interface/web/assets/icons/favicon-128x128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Loading…
Reference in a new issue