Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7cc406

Browse files
Use upstream zizmor release notes for releases (#51)
1 parent 8f87f00 commit c7cc406

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff 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 }}

0 commit comments

Comments
 (0)