aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2026-08-23 10:22:17 +0800
committerKunoiSayami <[email protected]>2026-08-23 10:22:17 +0800
commitd0549a2bff9422d00d6cdaab3b10713fa99612c3 (patch)
tree12178c38b5075f8681c224ace4211f241291e549 /.github
parent34fa202f0b80e0369155eb62e563c8c33cd7fb1e (diff)
feat(add-pkg): Add zsign-bin
Co-Authored-By: Claude Sonnet 5 <[email protected]> Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-pkgbuilds.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/update-pkgbuilds.yml b/.github/workflows/update-pkgbuilds.yml
index 1958f98..a99d738 100644
--- a/.github/workflows/update-pkgbuilds.yml
+++ b/.github/workflows/update-pkgbuilds.yml
@@ -284,3 +284,65 @@ jobs:
git add repo/rathole/PKGBUILD
git commit -m "feat(pkg): Update rathole to ${VERSION}"
git push || (git pull --rebase && git push)
+
+ update-zsign-bin:
+ name: Update zsign-bin
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v7
+
+ - name: Get latest release version
+ id: version
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ VERSION=$(gh api repos/zhlynn/zsign/releases/latest \
+ --jq '.tag_name | ltrimstr("v")')
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
+
+ - name: Check current version
+ id: check
+ run: |
+ CURRENT=$(grep '^pkgver=' repo/zsign-bin/PKGBUILD | cut -d'=' -f2)
+ echo "current=$CURRENT" >> "$GITHUB_OUTPUT"
+ if [ "$CURRENT" = "${{ steps.version.outputs.version }}" ]; then
+ echo "skip=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "skip=false" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Download asset and compute sha256sum
+ if: steps.check.outputs.skip == 'false'
+ id: sums
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ GIT_URL: https://github.com/zhlynn/zsign
+ run: |
+ FILE="zsign-linux-x86_64.tar.gz"
+ wget -q "$GIT_URL/releases/download/v${VERSION}/$FILE" -O "$FILE"
+ SUM=$(sha256sum "$FILE" | awk '{print $1}')
+ echo "sha256=$SUM" >> "$GITHUB_OUTPUT"
+ rm "$FILE"
+
+ - name: Update PKGBUILD
+ if: steps.check.outputs.skip == 'false'
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ SHA256: ${{ steps.sums.outputs.sha256 }}
+ run: |
+ sed -i "s/^pkgver=.*/pkgver=${VERSION}/" repo/zsign-bin/PKGBUILD
+ sed -i "s/^pkgrel=.*/pkgrel=1/" repo/zsign-bin/PKGBUILD
+ sed -i "0,/^sha256sums=/s|^sha256sums=(.*|sha256sums=('${SHA256}'|" repo/zsign-bin/PKGBUILD
+
+ - name: Commit and push
+ if: steps.check.outputs.skip == 'false'
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add repo/zsign-bin/PKGBUILD
+ git commit -m "feat(pkg): Update zsign-bin to ${VERSION}"
+ git push || (git pull --rebase && git push)