From f9c6177cc7b9496c07ef29305fc9642de3e9c547 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Fri, 15 Mar 2024 13:42:43 -0300 Subject: [PATCH] Add .forgejo/workflows/test.yaml --- .forgejo/workflows/test.yaml | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .forgejo/workflows/test.yaml diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml new file mode 100644 index 0000000..55af20d --- /dev/null +++ b/.forgejo/workflows/test.yaml @@ -0,0 +1,46 @@ +name: AUR Publish + +on: + push: + branches: + - main # Trigger the workflow on push to the main branch + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Arch Linux environment + uses: actions/setup-linux@v2 + with: + distribution: 'archlinux' + + - name: Install dependencies + run: | + sudo pacman -Syu --noconfirm + sudo pacman -S --noconfirm base-devel git devtools + + - name: Build package + run: | + pkgctl build + + - name: Push to AUR + env: + AUR_USERNAME: ${{ secrets.AUR_USERNAME }} + AUR_PASSWORD: ${{ secrets.AUR_PASSWORD }} + run: | + git clone https://aur.archlinux.org/your-package-name.git + cd your-package-name + cp PKGBUILD ../ + cd .. + git clone https://aur.archlinux.org/your-package-name-git.git + cd your-package-name-git + cp ../PKGBUILD . + git config user.name "$AUR_USERNAME" + git config user.email "$AUR_USERNAME@users.noreply.github.com" + git add PKGBUILD + git commit -m "Update PKGBUILD" + git push \ No newline at end of file