feat: 1.3.1 #60
This file contains hidden or 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-git | |
| on: | |
| push: | |
| paths: | |
| - PKGBUILD-git | |
| - .github/workflows/xivlauncher-git.yml | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - PKGBUILD-git | |
| 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@v5 | |
| - name: rename PKGBUILD | |
| run: mv PKGBUILD-git PKGBUILD | |
| - 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-git.pkg.tar.zst | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| 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@v5 | |
| - 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://aur@aur.archlinux.org/xivlauncher-git.git aur | |
| - name: rename PKGBUILD | |
| run: mv PKGBUILD-git PKGBUILD | |
| - 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 "cent@spline.de" | |
| 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 |