mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-04 06:00:23 +00:00
89a6f016a4
this workflow will update the meson version in meson.build when a new tag is created. This should cause less headache for the developer who keeps forgetting to change the version manually
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: arch package
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
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
|
|
pacman -Syu base-devel sudo meson python-mako glslang hub python-numpy python-matplotlib --noconfirm
|
|
- name: makepkg
|
|
run: |
|
|
echo "nobody ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|
chown nobody:nobody pkgbuild
|
|
cd pkgbuild
|
|
pkgver=$(git describe --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g')
|
|
sed -i "s/pkgver=.*/pkgver=$pkgver/g" PKGBUILD
|
|
sudo -u nobody -- sh -c "makepkg -fsCc --noconfirm"
|
|
- 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##*/}"
|
|
hub release edit "${assets[@]}" -m "" "$tag_name"
|