-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Release job after tag creations (#185)
- Loading branch information
Showing
2 changed files
with
56 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
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,42 @@ | ||
#!/bin/sh -ue | ||
# Copyright The OWASP Coraza contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# | ||
# Highly inspired by https://github.com/tetratelabs/wazero/blob/main/.github/workflows/release_notes.sh | ||
# | ||
# This script generates the release notes for a specific release tag. | ||
# .github/workflows/release_notes.sh v1.3.0 | ||
|
||
tag=$1 | ||
prior_tag=$(git tag -l 'v*'|sed "/${tag}/,+10d"|tail -1) | ||
if [ -n "${prior_tag}" ]; then | ||
range="${prior_tag}..${tag}" | ||
else | ||
range=${tag} | ||
fi | ||
|
||
git config log.mailmap true | ||
changelog=$(git log --format='%h %s %aN, %(trailers:key=co-authored-by)' "${range}") | ||
|
||
# strip the v off the tag name more shell portable than ${tag:1} | ||
version=$(echo "${tag}" | cut -c2-100) || exit 1 | ||
cat <<EOF | ||
coraza-proxy-wasm ${version} | ||
TODO: classify the below into up to 4 major headings and the rest as bulleted items in other changes | ||
The published release notes should only include the summary statement in this section. | ||
${changelog} | ||
## X packages | ||
Don't forget to cite who was involved and why | ||
## Other changes | ||
TODO: don't add trivial things like fixing spaces or non-concerns like build glitches | ||
* Z is now fixed thanks to Yogi Bear | ||
EOF |