Files
PortProtonQt/.gitea/workflows/build.yml
Boris Yumankulov 44bb095a03 blalala
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-09-28 13:02:21 +05:00

85 lines
2.7 KiB
YAML

name: Build AppImage, Arch and Fedora Packages
on:
workflow_dispatch:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
# Common version, will be used for tagging the release
VERSION: 0.1.6
PKGDEST: "/tmp/portprotonqt"
PACKAGE: "portprotonqt"
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
jobs:
build-arch:
name: Build Arch Package
runs-on: ubuntu-22.04
container:
image: archlinux:base-devel
volumes:
- /usr:/usr-host
- /opt:/opt-host
options: --privileged
steps:
- name: Prepare container
run: |
pacman -Sy --noconfirm --disable-download-timeout --needed git wget gnupg nodejs npm
sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$(nproc) -l$(nproc)"/g' /etc/makepkg.conf
sed -i 's/OPTIONS=(.*)/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge lto)/g' /etc/makepkg.conf
yes | pacman -Scc
pacman-key --init
pacman -S --noconfirm archlinux-keyring
mkdir -p /__w/portproton-repo
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
pacman-key --lsign-key 3056513887B78AEB
pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst'
pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
cat << EOM >> /etc/pacman.conf
[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist
EOM
pacman -Syy
useradd -m user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "PACKAGER=\"Boris Yumankulov <boria138@altlinux.org>\"" >> /etc/makepkg.conf
chown user -R /tmp
chown user -R ..
- name: Build
run: |
cd /__w/portproton-repo
git clone https://git.linux-gaming.ru/Boria138/PortProtonQt.git
cd /__w/portproton-repo/PortProtonQt/build-aux
chown user -R ..
su user -c "yes '' | makepkg --noconfirm -s"
- name: Checkout
uses: https://gitea.com/actions/checkout@v5
- name: Upload Arch package
uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name: PortProtonQt-Arch
path: ${{ env.PKGDEST }}/*
release:
name: Create and Publish Release
needs: [ build-arch ]
runs-on: ubuntu-latest
steps:
- uses: https://gitea.com/actions/checkout@v4
- name: Install required dependencies
run: |
sudo apt update
sudo apt install -y original-awk unzip
- name: Download all artifacts
uses: https://gitea.com/actions/download-artifact@v5
with:
path: release/