Skip to content

Commit d92c69f

Browse files
committed
github actions: build appimage for linux
1 parent 2e8df19 commit d92c69f

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

.github/workflows/main.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ jobs:
77
runs-on: ubuntu-16.04
88

99
steps:
10-
- name: Install dependencies
11-
run: sudo apt-get install libusb-1.0-0-dev libudev-dev
12-
1310
- uses: actions/checkout@v2
1411
- uses: actions/setup-python@v1
1512
with:
1613
python-version: '3.6.x'
1714

15+
- name: Install dependencies
16+
run: |
17+
sudo apt-get install libusb-1.0-0-dev libudev-dev ruby ruby-dev rubygems build-essential desktop-file-utils
18+
wget https://github.com/AppImage/pkg2appimage/archive/38603d92359a48189c35debad9005e8e902e6070.zip
19+
unzip *.zip
20+
sudo gem install --no-document fpm
21+
1822
- name: Setup venv
1923
run: |
2024
python -m venv venv
@@ -25,13 +29,15 @@ jobs:
2529
run: |
2630
source venv/bin/activate
2731
fbs freeze
28-
cd target
29-
tar cfJ vial-linux.tar.xz Vial
32+
fbs installer
33+
deactivate
34+
./pkg2appimage-*/pkg2appimage misc/Vial.yml
35+
mv out/Vial-*.AppImage out/Vial-x86_64.AppImage
3036
3137
- uses: actions/upload-artifact@v1
3238
with:
3339
name: vial-linux
34-
path: target/vial-linux.tar.xz
40+
path: out/Vial-x86_64.AppImage
3541

3642
build-mac:
3743
runs-on: macos-10.15

misc/Vial.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
app: Vial
2+
3+
ingredients:
4+
dist: xenial
5+
sources:
6+
- deb http://archive.ubuntu.com/ubuntu/ xenial main universe
7+
package: Vial
8+
debs:
9+
- ../target/Vial.deb
10+
11+
script:
12+
- cat > ./AppRun <<\EOF
13+
- #!/bin/sh
14+
- HERE=$(dirname $(readlink -f "${0}"))
15+
- export QT_QPA_PLATFORM=xcb
16+
- exec "${HERE}/opt/Vial/Vial" "$@"
17+
- EOF
18+
- chmod a+x ./AppRun
19+
- cp usr/share/icons/hicolor/256x256/apps/Vial.png .
20+
- mv usr/share/applications/Vial.desktop .
21+
- sed -i -e 's@^Version=.*@Version=1.0@g' Vial.desktop

0 commit comments

Comments
 (0)