forked from GourmandRecipeManager/gourmand
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 2.39 KB
/
appimage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Create AppImage
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
AppImage:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup AppImage Environment
run: |
sudo apt-get update -q
sudo apt-get -y install python3-testresources intltool imagemagick libgirepository1.0-dev
wget -c https://github.com/$(wget -q https://github.com/niess/python-appimage/releases/tag/python3.8 -O - | grep "python3.8.*-cp38-cp38-manylinux1_x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x ./python3*.AppImage
./python3*.AppImage --appimage-extract
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-*.AppImage
- name: Install Gourmand in AppImage
run: |
./squashfs-root/AppRun -m pip install --upgrade pip
./squashfs-root/AppRun -m pip install decorator six BeautifulSoup4 html5lib lxml pyenchant pygobject Sphinx
./squashfs-root/AppRun setup.py bdist_wheel
./squashfs-root/AppRun -m pip install .[epub-export,mycookbook,pdf-export,spellcheck,web-import]
./squashfs-root/AppRun -m pip install dist/gourmand*.whl
sed -i -e 's|/opt/python3.8/bin/python3.8|/usr/bin/gourmand|g' ./squashfs-root/AppRun
rm squashfs-root/*.desktop
cp data/io.github.GourmandRecipeManager.Gourmand.desktop squashfs-root/usr/share/applications/io.github.GourmandRecipeManager.Gourmand.desktop
cp data/io.github.GourmandRecipeManager.Gourmand.desktop squashfs-root/io.github.GourmandRecipeManager.Gourmand.desktop
cp data/io.github.GourmandRecipeManager.Gourmand.appdata.xml squashfs-root/usr/share/metainfo/io.github.GourmandRecipeManager.Gourmand.desktop.appdata.xml
convert data/io.github.GourmandRecipeManager.Gourmand.svg squashfs-root/usr/share/icons/hicolor/256x256/apps/io.github.GourmandRecipeManager.Gourmand.png
convert data/io.github.GourmandRecipeManager.Gourmand.svg squashfs-root/io.github.GourmandRecipeManager.Gourmand.png
- name: Pack AppImage
run: |
VERSION=${GITHUB_SHA::8} ./appimagetool-*.AppImage squashfs-root/
- name: Upload AppImage
uses: actions/upload-artifact@v2
with:
name: gourmand.AppImage
path: ./Gourmand-*.AppImage