Created
September 7, 2022 01:15
-
-
Save davisagli/9ecec1e48ca5b8c64cee89c6ef545ca6 to your computer and use it in GitHub Desktop.
Github action to preview release notes
This file contains hidden or 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
name: Preview release notes | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
release-notes: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
curl -s -X POST \ | |
https://api.github.com/repos/$GITHUB_REPOSITORY/releases/generate-notes \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-d '{"tag_name": "${{ github.head_ref || github.ref_name }}", "target_commitish": "main"}' \ | |
| jq -r .body >> $GITHUB_STEP_SUMMARY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment