-
-
Notifications
You must be signed in to change notification settings - Fork 4
100 lines (85 loc) · 2.43 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build and publish AppImages
env:
UBUNTU_RELEASE: jammy
UBUNTU_PUBKEY: 871920D1991BC93C
on:
pull_request:
push:
branches: main
release:
types: published
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- uses: actions/checkout@v4
- uses: rlespinasse/github-slug-action@v4
- name: Setup qemu for docker
uses: docker/setup-qemu-action@v2
if: matrix.platform != 'linux/amd64'
- name: Setup buildx for docker
uses: docker/setup-buildx-action@v2
- name: Compile in docker
uses: docker/build-push-action@v4
with:
platforms: ${{ matrix.platform }}
outputs: build
build-args: |
UBUNTU_RELEASE
- name: Prepare environment for building AppImage
env:
TARGET_PLATFORM: ${{ matrix.platform }}
shell: bash
run: |
set -eua
. build/.build-metadata.env
rm build/.build-metadata.env
APPIMAGE_SOURCE=build
APPIMAGE_VERSION="${GITHUB_REF_SLUG}"
APPIMAGE_APT_ARCH="${TARGETARCH}"
APPIMAGE_APT_DISTRO="${UBUNTU_RELEASE}"
APPIMAGE_APT_PUBKEY="${UBUNTU_PUBKEY}"
APPIMAGE_ARCH="${TARGETMACHINE}"
printenv | grep ^APPIMAGE_ >>"${GITHUB_ENV}"
- name: Build AppImage
uses: AppImageCrafters/build-appimage@v1.3
with:
recipe: dist/AppImageBuilder.yml
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: appimages
path: |
./*.AppImage
./*.AppImage.zsync
if-no-files-found: error
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
- build
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: appimages
path: assets
- name: Create checksum for release assets
shell: bash
run: |
algo="${SHA_ALGORITHM:-256}"
find assets -type f | while read -r asset; do
shasum --binary --algorithm "${algo}" "${asset}" >"${asset}.sha${algo}"
done
- name: Upload artifacts to GitHub release
uses: softprops/action-gh-release@v1
with:
files: assets/*