Skip to content

Commit

Permalink
add PKGBUILD for AUR and release action
Browse files Browse the repository at this point in the history
  • Loading branch information
KaMeHb-UA committed Oct 3, 2022
1 parent 423c442 commit 15ee463
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: aur-publish

on:
release:
types: [created]

jobs:
aur-publish:
runs-on: ubuntu-latest
env:
PKGBUILD: aur/PKGBUILD
steps:
- uses: actions/checkout@v2

- run: |
echo 'Modifying ${{ env.PKGBUILD }} with new version'
export pkgver=${{ github.event.release.tag_name }}
export PKGBUILD_CONTENT=`cat ${{ env.PKGBUILD }}`
echo pkgver="${pkgver:1}" > '${{ env.PKGBUILD }}'
echo "$PKGBUILD_CONTENT" >> '${{ env.PKGBUILD }}'
- uses: KSXGitHub/github-actions-deploy-aur@v2.5.0
with:
pkgname: yues
pkgbuild: ${{ env.PKGBUILD }}
commit_username: github-actions[bot]
commit_email: 41898282+github-actions[bot]@users.noreply.github.com
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update AUR package
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519

- run: |
echo 'Reset ${{ env.PKGBUILD }} changes'
git checkout HEAD -- '${{ env.PKGBUILD }}'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/aur
23 changes: 23 additions & 0 deletions aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pkgname=yues
pkgrel=1
pkgdesc='Yue library provider for any language/framework'
arch=(any)
depends=(
luajit
yue-lua51-bin
lua51-filesystem
lua51-socket
)
makedepends=(
)
url='https://github.com/KaMeHb-UA/yues'
license=('MIT')
source=("git+https://github.com/KaMeHb-UA/yues.git#tag=v$pkgver")
sha256sums=('SKIP')

package() {
mkdir -p "$pkgdir/usr/bin"
mkdir -p "$pkgdir/opt"
cp "$srcdir/yues/bin/yues" "$pkgdir/usr/bin/yues"
cp -r "$srcdir/yues/src" "$pkgdir/opt/yues"
}

0 comments on commit 15ee463

Please sign in to comment.