Add .forgejo/workflows/test.yaml
This commit is contained in:
parent
2e413dde03
commit
f9c6177cc7
1 changed files with 46 additions and 0 deletions
46
.forgejo/workflows/test.yaml
Normal file
46
.forgejo/workflows/test.yaml
Normal file
|
@ -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
|
Loading…
Reference in a new issue