name: Publish to AUR
on:
push:
tags:
- 'v*'
jobs:
publish-aur:
name: Publish to AUR
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version
id: version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Update PKGBUILD version
run: |
sed -i "s/^pkgver=.*/pkgver=${{ steps.version.outputs.version }}/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v4.1.1
with:
pkgname: lazycat-terminal
pkgbuild: ./PKGBUILD
updpkgsums: true
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Updatetoversion${{steps.version.outputs.version}}"
ssh_keyscan_types: rsa,ecdsa,ed25519
2. Configure GitHub Repository Secrets
To grant the runner write access to your AUR repository, you need to store your credentials securely.
Navigate to your GitHub repository and go to Settings -> Secrets and variables -> Actions. Click New repository secret and add these three variables:
AUR_USERNAME: Your AUR username.
AUR_EMAIL: Your registered AUR email.
AUR_SSH_PRIVATE_KEY: Your AUR SSH private key.
🔒 Security Note:
To prevent your primary SSH key from being exposed to third-party runners, it is highly recommended to generate a dedicated SSH key pair exclusively for this GitHub Action. Add the public key directly to your AUR profile settings.
Generate it via: ssh-keygen -t ed25519 -C "your.email@gmail.com"
3.Testing
Once configured, simply running git tag version && git push origin version from your computer will automatically trigger the GitHub Action. Alternatively, you can cut a tag manually using the GitHub web interface on your mobile phone.
As soon as the GitHub Action finishes running, your AUR package is updated!
As someone who champions the "code anywhere, on the move" philosophy, being able to handle an AUR deployment from my phone while out for a walk is a game-changer.
What about you? What repetitive plumbing or packaging bottlenecks in your Linux workflow or open-source maintenance are you dying to automate away? Do you have any favorite scripts or tools that completely freed you from your desktop?
Let's talk about it in the comments below—let's keep our time and energy focused on core architecture and engineering logic instead! 🚀