mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-18 08:40:35 -07:00
chore: add aur actions
This commit is contained in:
parent
d833495ab2
commit
b0e3d6f764
34
.github/workflows/aur.yml
vendored
Normal file
34
.github/workflows/aur.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: aur
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["release"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
aur:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set env VERSION
|
||||||
|
run: |
|
||||||
|
git fetch --tags
|
||||||
|
echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Replace PKGVER, SHA256SUMS_X86_64 in PKGBUILD
|
||||||
|
run: |
|
||||||
|
sed -i "s/PKGVER/$(echo ${{ env.VERSION }} | cut -c2-)/g" build/PKGBUILD
|
||||||
|
wget https://github.com/eeeXun/GTT/releases/download/${{ env.VERSION }}/gtt-linux-amd64.tar.gz
|
||||||
|
sed -i "s/SHA256SUMS_X86_64/$(sha256sum gtt-linux-amd64.tar.gz | awk '{print $1}')/g" build/PKGBUILD
|
||||||
|
|
||||||
|
- name: Publish to the AUR
|
||||||
|
uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
|
||||||
|
with:
|
||||||
|
pkgname: gtt-bin
|
||||||
|
pkgbuild: build/PKGBUILD
|
||||||
|
commit_message: Update to ${{ env.VERSION }}
|
||||||
|
commit_username: ${{ secrets.AUR_USERNAME }}
|
||||||
|
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
18
build/PKGBUILD
Normal file
18
build/PKGBUILD
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Maintainer: eeeXun <sdes96303@gmail.com>
|
||||||
|
|
||||||
|
pkgname=gtt-bin
|
||||||
|
pkgver=PKGVER
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Translate TUI in Golang'
|
||||||
|
url='https://github.com/eeeXun/GTT'
|
||||||
|
license=('MIT')
|
||||||
|
source_x86_64=("gtt-$pkgver-linux-amd64.tar.gz::${url}/releases/download/v${pkgver}/gtt-linux-amd64.tar.gz")
|
||||||
|
arch=('x86_64')
|
||||||
|
depends=('alsa-lib')
|
||||||
|
optdepends=('xclip: for clipboard support on X11' 'wl-clipboard: for clipboard support on Wayland')
|
||||||
|
provides=('gtt')
|
||||||
|
sha256sums_x86_64=('SHA256SUMS_X86_64')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 "gtt" "$pkgdir/usr/bin/gtt"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user