-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db23d9a
commit cef2365
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.