Skip to content

Commit

Permalink
Automatic AUR publish created (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasursadikov authored Nov 5, 2024
1 parent db23d9a commit cef2365
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/publish-aur.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Publish to AUR

on:
push:
tags:
- 'v*.*.*'

jobs:
aur:
runs-on: ubuntu-latest
container:
image: archlinux:latest

steps:
- name: Install Git and Base-devel
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm git base-devel
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_SSH_KEY }}" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
ssh-keyscan -t rsa aur.archlinux.org >> ~/.ssh/known_hosts
- name: Clone AUR repo
run: |
git clone ssh://aur@aur.archlinux.org/mud-git.git mud-git
cd mud-git
git config user.name "Jasur Sadikov"
git config user.email "jasur@sadikoff.com"
- name: Get Version from Tag
id: get_version
run: echo "VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_ENV

- name: Update PKGBUILD with New Version
run: |
sed -i "s/^pkgver=.*/pkgver=${{ env.VERSION }}/" PKGBUILD
- name: Generate .SRCINFO
run: |
makepkg --printsrcinfo > .SRCINFO
- name: Copy updated PKGBUILD and .SRCINFO
run: |
cp PKGBUILD .SRCINFO mud-git/
cd mud-git
git add PKGBUILD .SRCINFO
- name: Commit and Push
run: |
cd mud-git
if git diff --cached --quiet; then
echo "No changes to PKGBUILD or .SRCINFO, skipping push."
else
git commit -m "Release ${{ env.Version }}"
git push origin master
fi
File renamed without changes.

0 comments on commit cef2365

Please sign in to comment.