Skip to content

Telegram Bot API spec update #265

Telegram Bot API spec update

Telegram Bot API spec update #265

Workflow file for this run

name: Telegram Bot API spec update # based on changes on the official docs page
on:
# daily at 00:00 UTC
schedule:
- cron: '0 0 * * *'
# manually triggered
workflow_dispatch: { }
jobs:
update-spec-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Git repo
uses: actions/checkout@v6
with:
token: ${{ secrets.PERSONAL_TOKEN }}
fetch-depth: 0 # full history for version number
- name: Configure Git user
run: |
git config user.name "Mark Sto"
git config user.email "marksto@yourown.software"
- name: Prepare Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: Install Clojure tools
uses: DeLaGuardo/setup-clojure@13.6.0
with:
cli: '1.12.4.1629'
bb: '1.12.217'
- name: Update Telegram Bot API spec
id: update-spec
run: bb update-spec
- name: Run test suite
if: steps.update-spec.outputs.updated == 'true'
env:
BOT_AUTH_TOKEN: ${{ secrets.BOT_AUTH_TOKEN }}
run: bb test
- name: Commit and push when changed
if: steps.update-spec.outputs.updated == 'true'
run: |
git add resources/tg-bot-api-spec.json
if [ -f resources/.tg-bot-api-etag ]; then git add resources/.tg-bot-api-etag; fi
git commit -m "Update Telegram Bot API spec [skip ci]"
git push
- name: Build JAR file
if: steps.update-spec.outputs.updated == 'true'
run: bb jar
- name: Deploy to Clojars
if: steps.update-spec.outputs.updated == 'true'
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_DEPLOY_TOKEN }}
run: bb deploy