diff options
| author | KunoiSayami <[email protected]> | 2026-06-15 14:25:27 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2026-06-15 14:25:27 +0800 |
| commit | a9c907e5639f93a0e77f287eb1cfe90308f52b49 (patch) | |
| tree | e97da0ab2220f35f8993b17dbfccccc9d9e99234 /.github | |
| parent | 5ca920754cbbb8b84beb4c296dc174595197314d (diff) | |
feat(ci): Support ksutils-teamspeak-management-tools auto update
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/update-pkgbuilds.yml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/update-pkgbuilds.yml b/.github/workflows/update-pkgbuilds.yml index 273629c..c594e1a 100644 --- a/.github/workflows/update-pkgbuilds.yml +++ b/.github/workflows/update-pkgbuilds.yml @@ -128,3 +128,50 @@ jobs: git add repo/telegram-bot-api/PKGBUILD git commit -m "feat(pkg): Update telegram-bot-api to ${VERSION}" git push + + update-ksutils-teamspeak-management-tools: + name: Update ksutils-teamspeak-management-tools + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + + - name: Get latest release version + id: version + env: + GH_TOKEN: ${{ github.token }} + run: | + VERSION=$(gh api repos/KunoiSayami/teamspeak-management-tools.rs/releases/latest \ + --jq '.tag_name | ltrimstr("v")') + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Check current version + id: check + run: | + CURRENT=$(grep '^pkgver=' repo/ksutils-teamspeak-management-tools/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: Update PKGBUILD + if: steps.check.outputs.skip == 'false' + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + sed -i "s/^pkgver=.*/pkgver=${VERSION}/" repo/ksutils-teamspeak-management-tools/PKGBUILD + sed -i "s/^pkgrel=.*/pkgrel=1/" repo/ksutils-teamspeak-management-tools/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/ksutils-teamspeak-management-tools/PKGBUILD + git commit -m "feat(pkg): Update ksutils-teamspeak-management-tools to ${VERSION}" + git push |
