Skip to content

Commit d29b24e

Browse files
committed
[chore] Automate adding release notes to the release
1 parent cb10bf1 commit d29b24e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.ci/create-release-github.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/bin/bash
22

3-
OPERATOR_VERSION=$(git describe --tags)
3+
NOTES_FILE=/tmp/notes.md
4+
OPERATOR_VERSION=$(git describe --tags --abbrev=0)
5+
PREVIOUS_OPERATOR_VERSION=$(git describe --tags --abbrev=0 "${OPERATOR_VERSION}^")
6+
# Note: Changelog headers don't have the `v` prefix, so we need to drop the first letter in the sed expression below
7+
sed -n "/${OPERATOR_VERSION:1}/,/${PREVIOUS_OPERATOR_VERSION:1}/{/${PREVIOUS_OPERATOR_VERSION:1}/!p;}" CHANGELOG.md >${NOTES_FILE}
48

59
gh config set prompt disabled
610
gh release create \
711
-t "Release ${OPERATOR_VERSION}" \
12+
--notes-file ${NOTES_FILE} \
813
"${OPERATOR_VERSION}" \
914
'dist/opentelemetry-operator.yaml#Installation manifest for Kubernetes'

0 commit comments

Comments
 (0)