mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Package Khoj as Debian app in Github Release Workflow
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user