Skip to content

Commit b503f71

Browse files
committed
Update AUR automatically
1 parent 47ad9bf commit b503f71

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,60 @@ jobs:
272272
GH_TOKEN: ${{ github.token }}
273273
TAG: ${{ github.event.release.tag_name }}
274274
working-directory: ${{ steps.download.outputs.download-path }}
275+
276+
aur:
277+
name: Update the AUR
278+
# if: github.repository == 'Eeems/python-ext4' && github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
279+
# needs: publish
280+
runs-on: ubuntu-latest
281+
container:
282+
image: eeems/archlinux:nuitka
283+
steps:
284+
- name: Setup
285+
run: |
286+
yay -Syu --noconfirm
287+
yay -S --noconfirm \
288+
python-build \
289+
python-installer \
290+
python-setuptools \
291+
rhash
292+
293+
- name: Checkout the Git repository
294+
env:
295+
AUR_SSH: ${{ secrets.AUR_SSH }}
296+
run: |
297+
sudo chmod a+rwx .
298+
sudo chown -R notroot .
299+
sudo chown -R notroot $HOME
300+
mkdir -p "$HOME/.ssh/"
301+
pushd "$HOME/.ssh/"
302+
echo "$AUR_SSH" > aur
303+
echo -e "Host aur.archlinux.org\n IdentityFile ~/.ssh/aur\n StrictHostKeyChecking no" > config
304+
chmod 0600 config aur
305+
chmod 0700 .
306+
popd
307+
git clone ssh://aur@aur.archlinux.org/python-ext4.git .
308+
309+
- name: Update PKGBUILD
310+
run: |
311+
sed -i "s|pkgver=.*|pkgver=$version|" PKGBUILD
312+
updpkgsums PKGBUILD
313+
makepkg --printsrcinfo > .SRCINFO
314+
git add -f PKGBUILD .SRCINFO
315+
git config --local user.email 'nathaniel.vandiepen@gmail.com'
316+
git config --local user.name 'Nathaniel van Diepen'
317+
git commit -m 'Update to $version'
318+
git show
319+
env:
320+
# version: ${{ github.ref_name }}
321+
version: 1.3.2
322+
323+
- name: Test PKGBUILD
324+
run: |
325+
makepkg \
326+
--noconfirm \
327+
--syncdeps \
328+
--install
329+
330+
# - name: Push PKGBUILD
331+
# run: su notroot -c 'git push'

0 commit comments

Comments
 (0)