Skip to content

Fetch Latest Release Notes #19

Fetch Latest Release Notes

Fetch Latest Release Notes #19

Workflow file for this run

name: Fetch Latest Release Notes
on: workflow_dispatch
jobs:
fetch_release_notes:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Get latest release notes
id: fetch_release_notes
run: |
RELEASE_NOTES=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/latest" \
| jq -r .body)
echo "::set-output name=release_notes::$RELEASE_NOTES"
- name: Output release notes
run: |
echo "Latest Release Notes:"
echo "${{ steps.fetch_release_notes.outputs.release_notes }}"
- name: Notify Slack about latest release
run: |
SLACK_MESSAGE="*Latest Release Notes:*\n${{ steps.fetch_release_notes.outputs.release_notes }}"
curl -X POST -H 'Content-type: application/json' \
--data '{"text": "'"$SLACK_MESSAGE"'"}' \
${{ secrets.SLACK_WEBHOOK_URL }}