-
Notifications
You must be signed in to change notification settings - Fork 2
137 lines (115 loc) · 4.43 KB
/
appimage.yml
File metadata and controls
137 lines (115 loc) · 4.43 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Appimage
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
jobs:
build:
name: "${{ matrix.name }} (${{ matrix.arch }})"
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
include:
- runs-on: ubuntu-latest
name: "Build AppImage"
arch: x86_64
- runs-on: ubuntu-24.04-arm
name: "Build AppImage"
arch: aarch64
steps:
- uses: actions/checkout@v4
- name: Make AppImage
run: |
set -ex
sudo apt install wget tar zsync
ARCH="$(uname -m)"
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH"
URUNTIME_LITE="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-lite-$ARCH"
UPINFO="gh-releases-zsync|$(echo $GITHUB_REPOSITORY | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
BWRAP_URL="https://pkgs.pkgforge.dev/dl/bincache/$ARCH-linux/bubblewrap/official/bwrap/raw.dl"
BWRAP_PATCHED_URL="https://pkgs.pkgforge.dev/dl/bincache/x86_64-linux/bubblewrap/patched/bwrap/raw.dl"
AWK_URL="https://pkgs.pkgforge.dev/dl/bincache/$ARCH-linux/mawk/mawk/raw.dl"
SQUASHFUSE_URL="https://pkgs.pkgforge.dev/dl/bincache/$ARCH-linux/squashfuse/nixpkgs/squashfuse/raw.dl"
mkdir -p ./AppDir/bin
cp -v ./sas.sh ./AppDir/AppRun
cd ./AppDir
wget --retry-connrefused --tries=30 "$AWK_URL" -O ./bin/awk
wget --retry-connrefused --tries=30 "$BWRAP_URL" -O ./bin/bwrap
wget --retry-connrefused --tries=30 "$BWRAP_PATCHED_URL" -O ./bin/bwrap.patched
wget --retry-connrefused --tries=30 "$SQUASHFUSE_URL" -O ./bin/squashfuse
chmod +x ./AppRun ./bin/*
VERSION="$(./AppRun --version)"
[ -n "$VERSION" ]
echo "$VERSION" > ~/version
# make appimage with uruntime
cd ..
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime
wget --retry-connrefused --tries=30 "$URUNTIME_LITE" -O ./uruntime-lite
chmod +x ./uruntime*
# Keep the mount point (speeds up launch time)
sed -i 's|URUNTIME_MOUNT=[0-9]|URUNTIME_MOUNT=0|' ./uruntime-lite
# Add udpate info to runtime
echo "Adding update information \"$UPINFO\" to runtime..."
./uruntime-lite --appimage-addupdinfo "$UPINFO"
echo "Generating AppImage..."
./uruntime --appimage-mkdwarfs -f \
--set-owner 0 --set-group 0 \
--no-history --no-create-timestamp \
--compression zstd:level=22 -S26 -B8 \
--header uruntime-lite \
-i ./AppDir -o ./sas-"$VERSION"-anylinux-"$ARCH".AppImage
echo "Generating zsync file..."
zsyncmake *.AppImage -u *.AppImage
mkdir dist
mv -v *.AppImage* dist/
echo "All Done!"
- name: Check version file
run: |
cat ~/version
echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}"
- name: Upload artifact
uses: actions/upload-artifact@v4.6.2
with:
name: AppImage-${{ matrix.arch }}
path: 'dist'
- name: Upload version file
uses: actions/upload-artifact@v4.6.2
with:
name: version
path: ~/version
overwrite: true
release:
if: ${{ github.ref_name == 'main' }}
needs: [build]
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.3.0
with:
name: AppImage-x86_64
- uses: actions/download-artifact@v4.3.0
with:
name: AppImage-aarch64
- uses: actions/download-artifact@v4.3.0
with:
name: version
- name: Read version
run: |
cat version
export VERSION="$(cat version)"
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
#Version Release
- name: Continuous Releaser
uses: softprops/action-gh-release@v2.2.2
if: ${{ github.ref_name == 'main' }}
with:
name: "${{ env.APP_VERSION }}"
tag_name: "${{ env.APP_VERSION }}"
prerelease: false
draft: true
generate_release_notes: true
make_latest: true
files: |
*.AppImage*
continue-on-error: false