Skip to content

Update publish-aur.yml #2

Update publish-aur.yml

Update publish-aur.yml #2

Workflow file for this run

name: Publish to AUR
on:
push:
pull_request:
workflow_dispatch:
jobs:
aur-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" | tr -d '\r' > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keygen -y -f ~/.ssh/id_ed25519 > ~/.ssh/id_ed25519.pub # Ensure valid key
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts
- name: Clone AUR repository
run: |
git clone ssh://[email protected]/YOUR-PACKAGE-NAME.git aur-repo
cd aur-repo
- name: Copy necessary files
run: |
cp PKGBUILD .SRCINFO aur-repo/
cd aur-repo
git add PKGBUILD .SRCINFO
- name: Commit and push
run: |
cd aur-repo
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git commit -m "Automated update: PKGBUILD and .SRCINFO" || echo "No changes to commit"
git push