updata-aur #3
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: Get Tag from desktop and Push to Aur | |
| on: | |
| repository_dispatch: | |
| types: [updata-aur] | |
| jobs: | |
| push-to-aur: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update PKGBUILD with pkgver and fullver | |
| run: | | |
| tag="${{ github.event.client_payload.tag }}" | |
| fullver="${tag#v}" | |
| if [[ "$fullver" != *-* ]]; then | |
| echo "Error: Tag '$tag' does not contain a commit hash suffix (expected format: vX.Y.Z-xxxxxxxx)" | |
| echo "Please ensure the dispatched tag includes a -commit part." | |
| exit 1 | |
| fi | |
| pkgver="${fullver%%-*}" | |
| echo "Original tag: $tag" | |
| echo "fullver: $fullver" | |
| echo "pkgver: $pkgver" | |
| sed -i "s/^pkgver=.*/pkgver=$pkgver/" PKGBUILD | |
| sed -i "s/^fullver=.*/fullver=$fullver/" PKGBUILD | |
| - name: Generate .SRCINFO | |
| run: | | |
| docker pull archlinux/archlinux:latest | |
| docker run --rm -v "${PWD}":"/pkg" -w "/pkg" archlinux/archlinux:latest \ | |
| /bin/bash -c "pacman -Syu --noconfirm && pacman -S --noconfirm base-devel git && makepkg --printsrcinfo > .SRCINFO" | |
| - name: Show Files | |
| run: ls | |
| # - name: Publish to AUR | |
| # uses: KSXGitHub/github-actions-deploy-aur@master | |
| # with: | |
| # pkgname: 02engine-bin | |
| # pkgbuild: ./PKGBUILD | |
| # assets: | | |
| # .SRCINFO | |
| # commit_username: ${{ secrets.AUR_USERNAME }} | |
| # commit_email: ${{ secrets.AUR_EMAIL }} | |
| # ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| # commit_message: Update to ${{ github.event.client_payload.tag }} | |
| # ssh_keyscan_types: rsa,ecdsa,ed25519 |