Repository navigation
60 lines (48 loc) · 1.53 KB
/
Copy pathappimage.yml
File metadata and controls
60 lines (48 loc) · 1.53 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
name: Build Arch Package & AppImage (Git)
on:
workflow_dispatch:
jobs:
build:
name: Build with makepkg
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Install base dependencies
run: |
pacman -Syu --noconfirm archlinux-keyring
pacman -Syu --noconfirm base-devel git sudo wget zsync xorg-server-xvfb patchelf npm
# Enable multilib. Recent archlinux:latest containers no longer ship a
# commented #[multilib] block, so append the section if absent.
if ! grep -q '^\[multilib\]' /etc/pacman.conf; then
cat >> /etc/pacman.conf <<'EOF'
[multilib]
Include = /etc/pacman.d/mirrorlist
EOF
fi
sudo pacman -Syu --noconfirm
- name: Create build user
run: |
useradd -m builder
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
- name: Checkout repository
uses: actions/checkout@v6
- name: Fix permissions
run: chown -R builder:builder .
- name: Build package (makepkg -si)
run: |
sudo -u builder bash <<'EOF'
set -e
cd pkg/git
makepkg -si --noconfirm
cd ../AppImage/
chmod +x AppImage.sh
HEADLESS=1 ./AppImage.sh
EOF
- name: Upload package artifact
uses: actions/upload-artifact@v7
with:
name: arch-package
path: |
pkg/git/*.pkg.tar.zst
pkg/AppImage/dist/*.AppImage