Add AUR update workflow (#7715)

Port the update workflow from
https://github.com/Thyrum/aur-packages/blob/master/.github/workflows/unciv-bin.yml
to the Unciv github repository.

This does require adding some secrets to the repository and I don't know
how I would do this.
This commit is contained in:
Aron de Jong
2022-08-28 22:13:13 +02:00
committed by GitHub
parent 2e81a6152b
commit dd31276e5c

View File

@ -192,6 +192,32 @@ jobs:
${{ env.RELEASE_BODY }}
- name: Get AUR PKGBUILD
if: github.event_name == 'push' && contains(github.ref, 'ref/tags/')
continue-on-error: true
run: |
curl --silent --output PKGBUILD 'https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=unciv-bin'
sed -E -e "s#(_pkgver=).*#\1${{steps.tag.outputs.tag}}#" -e "s#(pkgrel=).*#\10#" -i PKGBUILD
- name: Publish AUR package
if: github.event_name == 'push' && contains(github.ref, 'ref/tags/')
continue-on-error: true
uses: Thyrum/github-actions-deploy-aur@master
with:
pkgname: unciv-bin
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_COMMIT_USERNAME }}
commit_email: ${{ secrets.AUR_COMMIT_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: |
Update to ${{steps.tag.outputs.tag}}
${{ env.RELEASE_BODY }}
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
updpkgsums: true
allow_empty_commits: false
- name: Post announcement on Discord
continue-on-error: true
## On patch releases, don't notify Discord