diff options
| author | KunoiSayami <[email protected]> | 2026-06-11 21:32:05 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2026-06-11 21:32:05 +0800 |
| commit | 38f7ba31074f5feacf5241198dabf5279c27b77e (patch) | |
| tree | 776c928857cf71658fbee9c0f4746c48883cc6ee /.github/workflows | |
| parent | 3ec428be1eca4a6d3831a240f2cc5e4e8bc14436 (diff) | |
fix(ci): Fix check telegram-bot-api version script
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/update-pkgbuilds.yml | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/.github/workflows/update-pkgbuilds.yml b/.github/workflows/update-pkgbuilds.yml index a36e29d..88aba11 100644 --- a/.github/workflows/update-pkgbuilds.yml +++ b/.github/workflows/update-pkgbuilds.yml @@ -86,19 +86,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Get latest release + - name: Get latest version from CMakeLists.txt id: version env: GH_TOKEN: ${{ github.token }} run: | - VERSION=$(gh api repos/tdlib/telegram-bot-api/releases/latest --jq '.tag_name | ltrimstr("v")') - COMMIT=$(gh api repos/tdlib/telegram-bot-api/git/refs/tags/"$(gh api repos/tdlib/telegram-bot-api/releases/latest --jq '.tag_name')" \ - --jq 'if .object.type == "tag" then .object.sha else .object.sha end') - # Resolve annotated tag to commit - TYPE=$(gh api repos/tdlib/telegram-bot-api/git/refs/tags/"$(gh api repos/tdlib/telegram-bot-api/releases/latest --jq '.tag_name')" --jq '.object.type') - if [ "$TYPE" = "tag" ]; then - COMMIT=$(gh api repos/tdlib/telegram-bot-api/git/tags/"$COMMIT" --jq '.object.sha') - fi + VERSION=$(curl -sf "https://raw.githubusercontent.com/tdlib/telegram-bot-api/master/CMakeLists.txt" \ + | grep -oP 'project\(TelegramBotApi VERSION \K[0-9]+\.[0-9]+') + COMMIT=$(gh api repos/tdlib/telegram-bot-api/commits/master --jq '.sha') echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "commit=$COMMIT" >> "$GITHUB_OUTPUT" |
