2023-04-10 16:59:21 +00:00
|
|
|
name: arch package
|
|
|
|
|
|
|
|
on:
|
2024-06-06 10:33:23 +00:00
|
|
|
workflow_dispatch:
|
2023-04-10 16:59:21 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-arch-pkg:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: archlinux:latest
|
|
|
|
steps:
|
|
|
|
- name: set git global safe directory
|
|
|
|
run: |
|
|
|
|
pacman -Syu git --noconfirm
|
|
|
|
git config --global --add safe.directory $(realpath .)
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install prerequisites
|
|
|
|
run: |
|
|
|
|
echo "ParallelDownloads = 10" >> /etc/pacman.conf
|
|
|
|
echo "\n" && echo "[multilib]" >> /etc/pacman.conf
|
|
|
|
echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
|
2023-05-28 22:04:30 +00:00
|
|
|
pacman -Syu base-devel sudo meson python-mako glslang hub python-numpy python-matplotlib --noconfirm
|
2023-04-10 16:59:21 +00:00
|
|
|
- name: makepkg
|
|
|
|
run: |
|
|
|
|
echo "nobody ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|
|
|
chown nobody:nobody pkgbuild
|
|
|
|
cd pkgbuild
|
2023-04-19 21:18:44 +00:00
|
|
|
pkgver=$(git describe --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g')
|
|
|
|
sed -i "s/pkgver=.*/pkgver=$pkgver/g" PKGBUILD
|
2024-04-03 17:28:00 +00:00
|
|
|
sudo -u nobody -- sh -c "makepkg -fsCc --noconfirm"
|
2023-04-10 16:59:21 +00:00
|
|
|
- name: Edit release and add files
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
assets=()
|
|
|
|
for pkg in ./pkgbuild/*mangohud*.tar.zst;
|
|
|
|
do echo $pkg;
|
|
|
|
assets+=("-a" "$pkg")
|
|
|
|
done;
|
|
|
|
tag_name="${GITHUB_REF##*/}"
|
2023-05-28 22:04:30 +00:00
|
|
|
hub release edit "${assets[@]}" -m "" "$tag_name"
|