This repository has been archived by the owner on Aug 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
80 lines (66 loc) · 3.15 KB
/
release.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Release_actions
on:
release:
types: [published]
jobs:
#Build .deb files for debian-based systems.
build_deb:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install g++ cmake extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext libqt5x11extras5-dev
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Build deb file
id: create_deb
run: |
mkdir build && cd ./build
cmake ..
cpack
#upload generated files to release
- name: Upload binaries to release
uses: AButler/[email protected]
with:
files: ./build/*.deb
repo-token: ${{ secrets.GITHUB_TOKEN }}
#Build universal and portable AppImage package.
build-appimage:
# Version of ubuntu building this appimage, it shouldn't be the latest verion of ubuntu to avoid breaking compatibility with older systems
runs-on: ubuntu-18.04
needs: build_deb
steps:
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install g++ cmake extra-cmake-modules qttools5-dev qttools5-dev-tools libsdl2-dev libxi-dev libxtst-dev libx11-dev itstool gettext libqt5x11extras5-dev qt5-default libsdl2-2.0-0 libqt5x11extras5 zsync
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Installing antimicroX is required for appimage creator
- name: Install antimicroX
run: |
wget "https://github.com/$GITHUB_REPOSITORY/releases/latest/download/antimicroX-3.0.0-Linux.deb"
sudo dpkg -i `ls -1 | grep .deb`
- name: Prepare files to create apppimage
run: |
mkdir build && cd ./build
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
make install DESTDIR=AppDir
#UPDATE_INFORMATION describes where information about updates can be found
- name: Create AppImage file
run: |
cd build
export UPDATE_INFORMATION="zsync|https://github.com/$GITHUB_REPOSITORY/releases/latest/download/antimicroX-x86_64.AppImage.zsync"
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt
./appimagetool-x86_64.AppImage AppDir/ -u "$UPDATE_INFORMATION"
#Upload generated files to release
- name: Upload binaries to release
uses: AButler/[email protected]
with:
files: ./build/antimicroX*.AppImage;./build/antimicroX*.zsync
repo-token: ${{ secrets.GITHUB_TOKEN }}