feat: upstream version 1.1.1 #70
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: xivlauncher | |
on: | |
push: | |
paths: | |
- PKGBUILD | |
- .github/workflows/xivlauncher.yml | |
pull_request: | |
branches: | |
- main | |
paths: | |
- PKGBUILD | |
workflow_dispatch: | |
inputs: | |
aur: | |
description: 'Push to AUR?' | |
required: false | |
default: 'false' | |
type: boolean | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: ghcr.io/centzilius/arch-makepkg:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare workspace | |
run: | | |
mkdir /home/builder/workspace | |
rsync -ahvP /__w/aur-xivlauncher/aur-xivlauncher/ /home/builder/workspace/ | |
chown -R builder:builder /home/builder/ | |
- name: Build package | |
run: | | |
cd /home/builder/workspace | |
sudo -u builder makepkg -scf --noconfirm | |
- name: Rename artifact | |
run: | | |
cd /home/builder/workspace | |
mv *.pkg.tar.zst xivlauncher.pkg.tar.zst | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xivlauncher | |
path: /home/builder/workspace/*.pkg.tar.zst | |
if-no-files-found: error | |
aur: | |
needs: build | |
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event.inputs.aur == 'true' }} | |
runs-on: ubuntu-latest | |
container: ghcr.io/centzilius/arch-makepkg:latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Checkout AUR | |
run: | | |
cd /root | |
mkdir -p .ssh | |
chmod 700 .ssh | |
ssh-keyscan aur.archlinux.org >> /root/.ssh/known_hosts | |
echo "${{ secrets.ssh_key }}" > /root/.ssh/id_ed25519 | |
chmod 400 /root/.ssh/* | |
ssh-keygen -y -f /root/.ssh/id_ed25519 > /root/.ssh/id_ed25519.pub | |
cd /tmp | |
git clone ssh://[email protected]/xivlauncher.git aur | |
- name: Copy files | |
run: | | |
rsync -ahvP $GITHUB_WORKSPACE/{PKGBUILD,XIVLauncher.desktop,xivlauncher-core} /tmp/aur/ | |
- name: Generate .SRCINFO | |
run: | | |
chown -R builder:builder /tmp/aur/ | |
cd /tmp/aur/ | |
sudo -u builder makepkg --printsrcinfo | tee .SRCINFO | |
chown -R root:root /tmp/aur/ | |
- name: Push | |
run: | | |
cd /tmp/aur/ | |
git config user.email "[email protected]" | |
git config user.name "cent" | |
git add --all | |
git commit -m 'sync from github' | |
git push -u origin master | |
- name: Cleanup SSH | |
if: always() | |
run: rm -rf /root/.ssh |