-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (60 loc) · 1.91 KB
/
build-arch-firmware.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
on:
push:
tags:
- 'linux_firmware-*'
jobs:
build:
name: Build Linux firmware package
runs-on: ubuntu-latest
container: archlinux
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install build dependencies
run: |
# Install makepkg deps
pacman --noconfirm -Syu
pacman --noconfirm -S sudo binutils fakeroot base-devel git rdfind
- name: Build Package
run: |
cd linux-firmware
# Fix permissions (can't makepkg as root)
echo "nobody ALL=(ALL) NOPASSWD: /usr/bin/pacman" >> /etc/sudoers
chown -R nobody .
# Package compression settings (Matches latest Arch)
export PKGEXT='.pkg.tar.zst'
export COMPRESSZST=(zstd -c -T0 --ultra -20 -)
export MAKEFLAGS="-j2"
# Build linux-firmware
su nobody --pty -p -s /bin/bash -c 'makepkg -f --syncdeps --skippgpcheck --noconfirm'
# Build linux-firmware-lenovo-sm8250
cd ../linux-firmware-lenovo-sm8250
chown -R nobody .
su nobody --pty -p -s /bin/bash -c 'makepkg -f --syncdeps --skippgpcheck --noconfirm'
- name: Prepare release
run: |
mkdir release
mv linux-firmware/*.pkg.tar.zst release
mv linux-firmware-lenovo-sm8250/*.pkg.tar.zst release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-firmware-aarch64-latest
path: release
release:
name: Publish release
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: linux-firmware-aarch64-latest
- name: Upload assets
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.BUILD_TOKEN }}
file: ./*-latest/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true