Skip to content

Commit 46a2012

Browse files
committed
ci: update linux deb package build workflow
1 parent 380d921 commit 46a2012

File tree

1 file changed

+16
-29
lines changed

1 file changed

+16
-29
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -76,36 +76,23 @@ jobs:
7676
run: |
7777
mkdir -p package/opt && mv AppFlowy package/opt/
7878
cd package && mkdir DEBIAN
79+
# Create control file
7980
printf 'Package: AppFlowy
80-
Version: %s
81-
Architecture: all
82-
Essential: no
83-
Priority: optional
84-
Maintainer: AppFlowy
85-
Description: An Open Source Alternative to Notion\n
86-
' "${{ github.ref_name }}" > DEBIAN/control
87-
printf '#!/bin/bash
88-
89-
set -e
90-
91-
# Create a link in /usr/bin for quick access using terminal
92-
ln -s /opt/AppFlowy/app_flowy /usr/bin/appflowy
93-
94-
# Update icon & executable path in desktop entry
95-
grep -rl "\[CHANGE_THIS\]" /opt/AppFlowy/appflowy.desktop.temp | xargs sed -i "s/\[CHANGE_THIS\]/\/opt/"
96-
97-
# Add shortcut in applications drawer
98-
mv /opt/AppFlowy/appflowy.desktop.temp /usr/share/applications/appflowy.desktop' > DEBIAN/postinst
99-
printf '#!/bin/bash
100-
101-
set -e
102-
103-
# Remove symbolic link from /usr/bin
104-
rm /usr/bin/appflowy
105-
106-
# Remove Desktop entry
107-
rm /usr/share/applications/appflowy.desktop' > DEBIAN/postrm
108-
cd ${{ env.LINUX_APP_RELEASE_PATH }} && dpkg-deb --build package ${{ env.LINUX_PACKAGE_NAME }}
81+
Version: %s
82+
Architecture: amd64
83+
Essential: no
84+
Priority: optional
85+
Maintainer: AppFlowy
86+
Description: An Open Source Alternative to Notion\n' "${{ github.ref_name }}" > DEBIAN/control
87+
88+
mkdir -p usr/share/applications
89+
# Update Exec & icon path in desktop entry
90+
grep -rl "\[CHANGE_THIS\]" ./opt/AppFlowy/appflowy.desktop.temp | xargs sed -i "s/\[CHANGE_THIS\]/\/opt/"
91+
# Add desktop entry in package
92+
mv ./opt/AppFlowy/appflowy.desktop.temp ./usr/share/applications/appflowy.desktop
93+
94+
# Build
95+
cd ../ && dpkg-deb --build --root-owner-group package ${{ env.LINUX_PACKAGE_NAME }}
10996
11097
- name: Upload Release Asset
11198
id: upload-release-asset

0 commit comments

Comments
 (0)