-
Notifications
You must be signed in to change notification settings - Fork 23
80 lines (71 loc) · 3.19 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
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: Build AppImage Packages
on:
# Run when called from other workflows
workflow_call:
inputs:
package_complete_version:
description: 'The output of the complete_version of the "determine_version" job from the build_and_release.yml workflow'
required: true
type: string
release_upload_url:
description: 'The output of the "create_release" job from the build_and_release.yml workflow'
required: true
type: string
jobs:
# Create the AppImage
AppImage:
name: Create the AppImage
runs-on: ubuntu-20.04
steps:
- name: Install the AppImage bundler and Performous deps
id: fetch_deps
run: |
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.0-beta.1/appimage-builder-1.0.0-677acbd-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
sudo apt update
sudo apt-get install -y --no-install-recommends git cmake build-essential gettext help2man libavcodec-dev libavformat-dev libswscale-dev qtbase5-dev qtmultimedia5-dev ca-certificates file
- name: Checkout Git
id: checkout_git
uses: actions/checkout@v3
- name: Build the AppImage
id: build_appimage
run: |
# Pull in our common build functions
. .github/workflows/build_functions.sh
PACKAGE_VERSION=${{ inputs.package_complete_version }}
sed -i s/@@VERSION@@/${PACKAGE_VERSION}/ AppImageBuilder.yml
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_WEBSERVER=ON -DENABLE_WEBCAM=ON -DPERFORMOUS_VERSION=$PACKAGE_VERSION ..
make -j$(nproc) install DESTDIR=../AppDir
cd ..
appimage-builder --recipe AppImageBuilder.yml --skip-test
## Provided by the common build functions
package_name "$(pwd)" "*.AppImage" "${PACKAGE_VERSION}"
# Upload artifacts during pull-requests
- name: Upload artifact
uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'pull_request' }}
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_PATH }}
# Upload artifacts on master
- name: Upload artifact with unified name
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.MASTER_ARTIFACT_NAME }}
path: ${{ env.MASTER_ARTIFACT_PATH }}
# Upload artifacts to releases only during Release events
- name: Upload artifacts to tagged release
id: upload_assets
if: ${{ github.event_name != 'pull_request' && github.ref_type == 'tag' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ inputs.release_upload_url }}
asset_path: ${{ env.ARTIFACT_PATH }}
asset_name: ${{ env.ARTIFACT_NAME }}
asset_content_type: application/octet-stream