Skip to content

Commit

Permalink
github actions: build appimage for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzz committed Jan 9, 2021
1 parent 2e8df19 commit d92c69f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ jobs:
runs-on: ubuntu-16.04

steps:
- name: Install dependencies
run: sudo apt-get install libusb-1.0-0-dev libudev-dev

- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6.x'

- name: Install dependencies
run: |
sudo apt-get install libusb-1.0-0-dev libudev-dev ruby ruby-dev rubygems build-essential desktop-file-utils
wget https://github.com/AppImage/pkg2appimage/archive/38603d92359a48189c35debad9005e8e902e6070.zip
unzip *.zip
sudo gem install --no-document fpm
- name: Setup venv
run: |
python -m venv venv
Expand All @@ -25,13 +29,15 @@ jobs:
run: |
source venv/bin/activate
fbs freeze
cd target
tar cfJ vial-linux.tar.xz Vial
fbs installer
deactivate
./pkg2appimage-*/pkg2appimage misc/Vial.yml
mv out/Vial-*.AppImage out/Vial-x86_64.AppImage
- uses: actions/upload-artifact@v1
with:
name: vial-linux
path: target/vial-linux.tar.xz
path: out/Vial-x86_64.AppImage

build-mac:
runs-on: macos-10.15
Expand Down
21 changes: 21 additions & 0 deletions misc/Vial.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
app: Vial

ingredients:
dist: xenial
sources:
- deb http://archive.ubuntu.com/ubuntu/ xenial main universe
package: Vial
debs:
- ../target/Vial.deb

script:
- cat > ./AppRun <<\EOF
- #!/bin/sh
- HERE=$(dirname $(readlink -f "${0}"))
- export QT_QPA_PLATFORM=xcb
- exec "${HERE}/opt/Vial/Vial" "$@"
- EOF
- chmod a+x ./AppRun
- cp usr/share/icons/hicolor/256x256/apps/Vial.png .
- mv usr/share/applications/Vial.desktop .
- sed -i -e 's@^Version=.*@Version=1.0@g' Vial.desktop

0 comments on commit d92c69f

Please sign in to comment.