Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,59 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Run Make
run: make BUILD_TYPE=DEBUG
run: make BUILD_TYPE=RELEASE

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build_artifacts
path: build/*
path: build/*

publish_to_aur:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install AUR tools
run: |
sudo apt-get update
sudo apt-get install -y git openssh-client makepkg

- name: Setup SSH for AUR
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_KEY }}" > ~/.ssh/rsa_aur
chmod 600 ~/.ssh/rsa_aur
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts

- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Update chibi-git AUR
run: |
git clone ssh://aur@aur.archlinux.org/chibi-cli-git.git
cd chibi-git

# bump pkgrel to trigger rebuild
current=$(grep '^pkgrel=' PKGBUILD | cut -d= -f2)
next=$((current+1))
sed -i "s/^pkgrel=.*/pkgrel=$next/" PKGBUILD

makepkg --printsrcinfo > .SRCINFO

git config user.name "github-actions"
git config user.email "actions@github.com"
git commit -am "update"
git push
22 changes: 22 additions & 0 deletions installer_scripts/aur/chibi-cli-bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Created by https://www.toptal.com/developers/gitignore/api/archlinuxpackages
# Edit at https://www.toptal.com/developers/gitignore?templates=archlinuxpackages

### ArchLinuxPackages ###
*.tar
*.tar.*
*.jar
*.exe
*.msi
*.zip
*.tgz
*.log
*.log.*
*.sig
*.deb

pkg/
src/

.SRCINFO

# End of https://www.toptal.com/developers/gitignore/api/archlinuxpackages
24 changes: 24 additions & 0 deletions installer_scripts/aur/chibi-cli-bin/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Maintainer: CosmicPredator <cosmicpredator@proton.me>
pkgname=chibi-cli-bin
pkgver=1.2.0
pkgrel=1
pkgdesc="Chibi for AniList - A lightweight anime & manga tracker CLI app powered by AniList."
arch=('x86_64')
url="https://chibi-cli.pages.dev/"
license=('GPL3')

source=(
"https://github.com/CosmicPredator/chibi-cli/releases/download/${pkgver}/chibi_${pkgver}_amd64.deb"
)
sha256sums=(
'5e7d7383774a0a8ab72b4d20ac522e4303c9a55f8aa3f97489f0a8f4fd55bfe3'
)

options=('!debug')

package() {
bsdtar -xf "$srcdir/chibi_${pkgver}_amd64.deb"
bsdtar -xf data.tar.*

install -Dm755 usr/local/bin/chibi "$pkgdir/usr/bin/chibi"
}
21 changes: 21 additions & 0 deletions installer_scripts/aur/chibi-cli-git/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Created by https://www.toptal.com/developers/gitignore/api/archlinuxpackages
# Edit at https://www.toptal.com/developers/gitignore?templates=archlinuxpackages

### ArchLinuxPackages ###
*.tar
*.tar.*
*.jar
*.exe
*.msi
*.zip
*.tgz
*.log
*.log.*
*.sig
*.deb

pkg/
src/

.SRCINFO
# End of https://www.toptal.com/developers/gitignore/api/archlinuxpackages
36 changes: 36 additions & 0 deletions installer_scripts/aur/chibi-cli-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
pkgname=chibi-cli-git
_pkgname=chibi-cli
pkgver=1.2.0.36.gf585d76
pkgrel=1
pkgdesc="Chibi for AniList - A lightweight anime & manga tracker CLI app powered by AniList."
arch=('x86_64')
url="https://chibi-cli.pages.dev/"
git_url="https://github.com/CosmicPredator/chibi-cli"
license=('GPL3')
depends=('glibc')
makedepends=('git' 'go>=1.25')
provides=('chibi')
conflicts=('chibi' 'chibi-cli-bin')
options=('!debug')

source=("git+$git_url.git")
sha256sums=('SKIP')

pkgver() {
cd "$srcdir/$_pkgname"
git describe --tags --long | sed 's/^v//;s/-/./g'
}

build() {
cd "$srcdir/$_pkgname"

LATEST_TAG=$(git describe --tags)
LDFLAGS="-X main.VERSION=${LATEST_TAG}"

GOOS=linux GOARCH=amd64 \
go build -ldflags="$LDFLAGS" -o chibi
}

package() {
install -Dm755 "$srcdir/$_pkgname/chibi" "$pkgdir/usr/bin/chibi"
}
Loading