Skip to content

Release Notification #118

Release Notification

Release Notification #118

name: Release Notification
on:
release:
types: [published]
workflow_dispatch: # This allows manual triggering
permissions:
contents: write
jobs:
release-notification:
runs-on: ubuntu-latest
steps:
- name: Fetch latest release tag
run: |
latest_release=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
echo "LATEST_RELEASE_TAG=$latest_release" >> $GITHUB_ENV
- name: Send release notification to bot playground
env:
LATEST_RELEASE_TAG: ${{ env.LATEST_RELEASE_TAG }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/clEsperanto/bot_playground/dispatches \
-d '{"event_type":"clic_update", "client_payload": {"release_tag": "$LATEST_RELEASE_TAG"}}'