Skip to content

Commit 0263870

Browse files
committed
Update chdig-bin in AUR from CI
1 parent bf2d4c4 commit 0263870

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,54 @@ jobs:
3333
windows-packages-x86_64/*
3434
linux-packages-amd64/*
3535
linux-packages-aarch64/*
36+
37+
- name: Generate env
38+
run: |
39+
- name: Generate PKGBUILD
40+
run: |
41+
set -x
42+
43+
VERSION="${GITHUB_REF##*/}"
44+
VERSION="${VERSION#v}"
45+
SHA256=$(sha256sum linux-packages-amd64/chdig-$VERSION-1-x86_64.pkg.tar.zst | cut -d' ' -f1)
46+
47+
cat > PKGBUILD <<EOL
48+
# shellcheck disable=SC2034,SC2154
49+
# - SC2034 - appears unused.
50+
# - SC2154 - pkgdir is referenced but not assigned.
51+
52+
# Maintainer: Azat Khuzhin <a3at.mail@gmail.com>
53+
pkgname=chdig-bin
54+
pkgver=$VERSION
55+
pkgrel=1
56+
pkgdesc="Dig into ClickHouse with TUI interface (binaries for latest stable version)"
57+
arch=('x86_64')
58+
conflicts=("chdig")
59+
provides=("chdig")
60+
url="https://github.com/azat/chdig"
61+
license=('MIT')
62+
source=(
63+
"https://github.com/azat/chdig/releases/download/v\$pkgver/chdig-\$pkgver-1-x86_64.pkg.tar.zst"
64+
)
65+
sha256sums=(
66+
'$SHA256'
67+
)
68+
69+
package() {
70+
tar -C "\$pkgdir" -xvf chdig-\$pkgver-1-x86_64.pkg.tar.zst
71+
rm -f "\$pkgdir/.PKGINFO"
72+
rm -f "\$pkgdir/.MTREE"
73+
}
74+
# vim set: ts=4 sw=4 et
75+
EOL
76+
cat PKGBUILD
77+
- name: Publish to the AUR
78+
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
79+
with:
80+
pkgname: chdig-bin
81+
pkgbuild: PKGBUILD
82+
commit_username: Azat Khuzhin
83+
commit_email: a3at.mail@gmail.com
84+
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
85+
commit_message: Release $GITHUB_REF
86+
# force_push: 'true'

0 commit comments

Comments
 (0)