Skip to content

Commit

Permalink
Merge pull request #336 from clEsperanto/release-notification-workflow
Browse files Browse the repository at this point in the history
send latest tag to pycle and clej repo
  • Loading branch information
StRigaud authored Aug 28, 2024
2 parents be42e55 + 23095cc commit 516388b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Notification

on:
release:
types: [published]
workflow_dispatch: # This allows manual triggering

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 pyclesperanto
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.RELEASE_PAT }}" \
https://api.github.com/repos/clEsperanto/pyclesperanto/dispatches \
-d '{"event_type":"custom_event", "client_payload": {"release_tag": "${{ env.LATEST_RELEASE_TAG }}"}}'
- name: Send release notification to clesperantoJ
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.RELEASE_PAT }}" \
https://api.github.com/repos/clEsperanto/clesperantoj_prototype/dispatches \
-d '{"event_type":"custom_event", "client_payload": {"release_tag": "${{ env.LATEST_RELEASE_TAG }}"}}'

0 comments on commit 516388b

Please sign in to comment.