Add AUR PKGBUILD

This commit is contained in:
ReenigneArcher 2022-06-18 20:46:59 -04:00
commit f4074341a5
9 changed files with 351 additions and 0 deletions

View file

@ -52,6 +52,91 @@ jobs:
echo Within 'CMakeLists.txt' change "project(Sunshine [VERSION $cmakelists_version]" to "project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]"
exit 1
build_linux_aur:
name: Linux AUR
runs-on: ubuntu-latest
needs: check_changelog
strategy:
fail-fast: false
matrix:
include:
- aur_pkg: sunshine
- aur_pkg: sunshine-git
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Dependencies Linux AUR
run: |
sudo apt-get update -y
sudo apt-get install -y \
cmake
- name: Configure PKGBUILD files
run: |
mkdir -p artifacts
mkdir -p build
cd build
cmake -DSUNSHINE_CONFIGURE_AUR=ON -DSUNSHINE_CONFIGURE_ONLY=ON -DSUNSHINE_AUR_PKG=${{ matrix.aur_pkg }} ..
cd ..
mv ./build/PKGBUILD ./artifacts/
# mv ./build/.SRCINFO ./artifacts/
# mv ./packaging/linux/aur/tmp/* ./artifacts/
ls artifacts
- name: Validate package
uses: hapakaien/archlinux-package-action@v2
with:
path: artifacts
flags: '--syncdeps --noconfirm'
namcap: true
srcinfo: true
aur: true # workaround mirror problem
- name: Test artifacts
run: |
ls artifacts
# - name: PKGBUILD AUR
# uses: sunshinestream/pkgbuild-aur@sunshine-fix
# with:
# pkg-name: artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: sunshine-linux-aur-${{ matrix.aur_pkg }}
path: artifacts/
- name: Setup Publish AUR Variables
if: ${{ github.event_name == 'push' }}
run: |
if [ ${{ github.ref == 'refs/heads/master' && matrix.aur_pkg == 'sunshine' }} ]
then
echo "aur_publish=true" >> $GITHUB_ENV
elif [ ${{ github.ref == 'refs/heads/nightly' && matrix.aur_pkg == 'sunshine-git' }} ]
then
echo "aur_publish=true" >> $GITHUB_ENV
else
echo "aur_publish=false" >> $GITHUB_ENV
fi
- name: Publish AUR package
if: ${{ env.aur_publish }}
uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
with:
pkgname: ${{ env.aur_pkgname }}
pkgbuild: ./artifacts/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Autoupdate from GitHub
build_linux_flatpak:
name: Linux Flatpak
runs-on: ubuntu-18.04