diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64a27ccc..ae47e082 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file + name: khoj.deb + path: dist/Khoj.deb \ No newline at end of file diff --git a/Khoj.desktop b/Khoj.desktop new file mode 100644 index 00000000..5ff50a1f --- /dev/null +++ b/Khoj.desktop @@ -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 \ No newline at end of file diff --git a/src/interface/web/assets/icons/favicon-128x128.png b/src/interface/web/assets/icons/favicon-128x128.png new file mode 100644 index 00000000..7fba4f64 Binary files /dev/null and b/src/interface/web/assets/icons/favicon-128x128.png differ