-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #336 from clEsperanto/release-notification-workflow
send latest tag to pycle and clej repo
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}"}}' |