Skip to content

Commit

Permalink
ci: add AUR pkg updates PRs on release
Browse files Browse the repository at this point in the history
  • Loading branch information
javalsai committed Sep 15, 2024
1 parent 9f32ce2 commit c4a996c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,37 @@ jobs:
tag: v${{ inputs.version }}
commit: ${{ github.sha }}
artifacts: builds/lidm-*
artifactsErrorsFailBuild: true
artifactErrorsFailBuild: true
body: Release notes not generated yet.

# TODO: get checksums and commit new AUR pkgbuilds
aur-update:
name: Update AUR pkgs
runs-on: ubuntu-24.04
container: archlinux:latest
permissions: write-all
needs: release
steps:
- run: pacman -Sy --noconfirm git github-cli base-devel pacman-contrib

- uses: actions/checkout@v4

- run: |
cd "assets/pkg/aur"
chown nobody:nobody . -R
su - -s /bin/bash nobody -c "$PWD/update-pkgs.sh ${{ inputs.version }}"
su - -s /bin/bash nobody -c "$PWD/test-makepkg.sh" # This will also update -git pkgver
chown $UID:$(id -g) . -R
- run: |
BRANCH=actions/update-aur-${{ inputs.version }}
git config --global --add safe.directory $GITHUB_WORKSPACE
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git checkout -b $BRANCH
git commit -am "Update AUR pkgs to v${{ inputs.version }}"
git push -u origin $BRANCH
gh pr create --head $BRANCH \
--title "[AUR update]: Bump to ${{ inputs.version }}" \
--body "*This PR was created automatically*"
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion assets/pkg/aur/lidm-bin/.SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkgbase = lidm-bin
depends = pam
provides = lidm
conflicts = lidm
source = lidm::https://github.com/javalsai/lidm/releases/download/v0.1.0/lidm-x86_64
source = lidm::https://github.com/javalsai/lidm/releases/download/v0.1.0/lidm-amd64
source = default-theme.ini::https://raw.githubusercontent.com/javalsai/lidm/v0.1.0/themes/default.ini
source = lidm.1::https://raw.githubusercontent.com/javalsai/lidm/v0.1.0/assets/man/lidm.1
source = lidm-config.5::https://raw.githubusercontent.com/javalsai/lidm/v0.1.0/assets/man/lidm-config.5
Expand Down
2 changes: 1 addition & 1 deletion assets/pkg/aur/lidm-bin/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license=('GPL')
provides=('lidm')
conflicts=('lidm')
source=(
"lidm::$url/releases/download/v$pkgver/lidm-$arch"
"lidm::$url/releases/download/v$pkgver/lidm-amd64"
"default-theme.ini::https://raw.githubusercontent.com/javalsai/lidm/v$pkgver/themes/default.ini"
"lidm.1::https://raw.githubusercontent.com/javalsai/lidm/v$pkgver/assets/man/lidm.1"
"lidm-config.5::https://raw.githubusercontent.com/javalsai/lidm/v$pkgver/assets/man/lidm-config.5"
Expand Down
2 changes: 1 addition & 1 deletion assets/pkg/aur/lidm-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgbase = lidm-git
pkgdesc = A fully colorful customizable TUI display manager made in C. (last git commit)
pkgver = 0.0.2.r37.gf1f9d6b
pkgver = 0.1.0.r0.g8071694
pkgrel = 1
url = https://github.com/javalsai/lidm
arch = any
Expand Down

0 comments on commit c4a996c

Please sign in to comment.