File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,11 +52,24 @@ jobs:
5252 - name : create release on new tag if new changes exist
5353 if : env.changes_exist == 'true'
5454 run : |
55- TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
56- echo $TAG_NAME
55+ TAG_NAME=$(git describe --tags "$(git rev-list --tags --max-count=1)")
56+ RELEASE_NOTES_FILE=release-notes.md
57+
58+ RELEASE_NOTES=$(gh release view "$TAG_NAME" \
59+ --repo zizmorcore/zizmor \
60+ --json body \
61+ --jq '.body // ""')
62+
63+ if [[ -z "$RELEASE_NOTES" ]]; then
64+ RELEASE_NOTES="See: https://github.com/zizmorcore/zizmor/releases/tag/${TAG_NAME}"
65+ fi
66+
67+ printf '%s\n' "$RELEASE_NOTES" > "$RELEASE_NOTES_FILE"
68+
69+ echo "$TAG_NAME"
5770 gh release create "$TAG_NAME" \
5871 --title "$TAG_NAME" \
59- --notes "See: https://github.com/zizmorcore/zizmor/releases/tag/${TAG_NAME} " \
72+ --notes-file "$RELEASE_NOTES_FILE " \
6073 --latest
6174 env :
6275 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments