Skip to content

release: 1.1.2

release: 1.1.2 #22

Workflow file for this run

name: "Release AUR"
on:
push:
tags:
- "*"
jobs:
aur:
name: "Release AUR"
runs-on: ubuntu-latest
if: github.repository_owner == 'ouuan'
steps:
- uses: actions/checkout@v4
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: "pip install -r requirements.txt"
- name: Check version
run: '[[ $(python pacwatch.py --version) == "pacwatch ${GITHUB_REF/refs\/tags\//}" ]]'
- name: Update files
id: update-files
run: |
sed -i "s/%version%/${GITHUB_REF/refs\/tags\//}/g" aur/PKGBUILD
sed -i "s/%sha256sums%/$(shasum -a256 pacwatch.py | cut -d' ' -f1)/g" aur/PKGBUILD
- name: Check PKGBUILD
uses: ouuan/pkgbuild-action@master
with:
path: aur
- name: Clone AUR and update
run: |
git clone ssh://[email protected]/pacwatch.git ../aur
shopt -s dotglob
shopt -s extglob
rm ../aur/!(.git|.|..) || true
cp -r aur/* ../aur
cd ../aur
git config user.name "Yufan You"
git config user.email "[email protected]"
git add -A
git diff-index @ --exit-code --quiet || git commit -m "Update from GitHub Actions: ${GITHUB_REF/refs\/tags\//}
https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
git push