Skip to content

Commit 53c7627

Browse files
committed
update packaging workers, versioon bump
1 parent eb1bfad commit 53c7627

3 files changed

Lines changed: 42 additions & 14 deletions

File tree

.github/workflows/update-aur.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,53 @@ jobs:
2121
VERSION=$(grep '^version =' gitfetch/pyproject.toml | sed 's/version = "\(.*\)"/\1/')
2222
echo "version=$VERSION" >> $GITHUB_OUTPUT
2323
24-
- name: Checkout AUR repo
25-
uses: actions/checkout@v4
26-
with:
27-
repository: Matars/aur-gitfetch
28-
token: ${{ secrets.AUR_TAP_TOKEN }}
29-
path: aur-repo
24+
- name: Install AUR tools
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y git
28+
29+
- name: Setup SSH for AUR
30+
run: |
31+
mkdir -p ~/.ssh
32+
echo "${{ secrets.AUR_SSH_KEY }}" > ~/.ssh/aur_key
33+
chmod 600 ~/.ssh/aur_key
34+
echo "Host aur.archlinux.org" >> ~/.ssh/config
35+
echo " IdentityFile ~/.ssh/aur_key" >> ~/.ssh/config
36+
echo " User aur" >> ~/.ssh/config
37+
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
38+
39+
- name: Clone AUR package
40+
run: |
41+
git clone ssh://aur@aur.archlinux.org/gitfetch-python.git aur-repo
3042
3143
- name: Update PKGBUILD
3244
run: |
3345
cd aur-repo
3446
VERSION=${{ steps.get_version.outputs.version }}
47+
48+
SOURCE_URL="https://github.com/Matars/gitfetch/archive/refs/tags/v${VERSION}.tar.gz"
49+
SHA256=$(curl -sL "$SOURCE_URL" | sha256sum | awk '{print $1}')
50+
3551
sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD
3652
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
53+
sed -i "s|^source=.*|source=(\"$SOURCE_URL\")|" PKGBUILD
54+
sed -i "s/^sha256sums=.*/sha256sums=('$SHA256')/" PKGBUILD
55+
56+
- name: Generate .SRCINFO
57+
run: |
58+
cd aur-repo
59+
docker run --rm -v $(pwd):/pkg archlinux:latest /bin/bash -c "
60+
pacman -Syu --noconfirm
61+
pacman -S --noconfirm namcap
62+
cd /pkg
63+
makepkg --printsrcinfo > .SRCINFO
64+
"
3765
38-
- name: Commit and push
66+
- name: Commit and push to AUR
3967
run: |
4068
cd aur-repo
41-
git config user.name "GitHub Actions"
42-
git config user.email "actions@github.com"
43-
git add PKGBUILD
44-
git commit -m "Update gitfetch to v${{ steps.get_version.outputs.version }}"
69+
git config user.name "Matar"
70+
git config user.email "khaledmatar19733@gmail.com"
71+
git add PKGBUILD .SRCINFO
72+
git commit -m "Update gitfetch-python to v${{ steps.get_version.outputs.version }}"
4573
git push

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
python = pkgs.python313;
1414
pythonPackages = python.pkgs;
1515

16-
myPackage = pythonPackages.buildPythonPackage {
16+
myPackage = pythonPackages.buildPythonPackage rec {
1717
pname = "gitfetch";
18-
version = "1.3.2";
18+
version = (builtins.fromTOML (builtins.readFile ./pyproject.toml)).project.version;
1919
src = ./.;
2020

2121
# Main dependencies

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "gitfetch"
7-
version = "1.3.2"
7+
version = "1.3.3"
88
description = "A neofetch-style CLI tool for git provider statistics"
99
readme = "README.md"
1010
requires-python = ">=3.8"

0 commit comments

Comments
 (0)