build-aur.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Build AUR Package
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. package_name:
  6. description: "AUR package name (e.g., yay)"
  7. required: true
  8. type: string
  9. default: ""
  10. version:
  11. description: "Version or git tag/branch (optional, defaults to latest)"
  12. required: false
  13. type: string
  14. default: "latest"
  15. arch:
  16. description: "Target architecture (optional, defaults to x86_64)"
  17. required: false
  18. type: string
  19. default: "x86_64"
  20. jobs:
  21. build:
  22. runs-on: ubuntu-latest
  23. container: archlinux:latest
  24. steps:
  25. - name: Update package database and install dependencies
  26. run: |
  27. pacman -Syu --noconfirm
  28. pacman -S --noconfirm base-devel git
  29. - name: Checkout repository
  30. uses: actions/checkout@v4
  31. - name: Make script executable
  32. run: chmod +x scripts/build-aur.sh
  33. - name: Build AUR package
  34. run: |
  35. ./scripts/build-aur.sh "${{ inputs.package_name }}" "${{ inputs.version }}"
  36. - name: Upload built package as artifact
  37. uses: actions/upload-artifact@v4
  38. with:
  39. name: aur-package-${{ inputs.package_name }}-${{ inputs.version }}
  40. path: ./*.tar.gz
  41. retention-days: 30
  42. package:
  43. needs: build
  44. runs-on: ubuntu-latest
  45. if: always()
  46. steps:
  47. - name: Notify on failure
  48. if: failure()
  49. run: echo "Build failed for ${{ inputs.package_name }}"