Skip to content

Commit 39f4ad6

Browse files
ci(release): compact marker subject, skip CI on marker, filter prior markers (#1397)
1 parent f184b05 commit 39f4ad6

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,32 @@ jobs:
154154
# `git tag --sort=-v:refname` puts the newest first; filter out the just-released tag.
155155
PREV=$(git tag --list 'v*' --sort=-v:refname | grep -v "^${TAG}$" | head -1 || true)
156156
157+
# Compact subject: `chore(release): OIL <tag>, <date>`.
158+
#
159+
# Change list excludes prior release-marker commits so a release
160+
# doesn't list its predecessors. --extended-regexp matches both the
161+
# current shorter format ("OIL v...") and the legacy longer one
162+
# ("Open Install Library Release v...") so older markers on main
163+
# stay filtered too.
164+
#
165+
# `[skip ci]` at the end tells GitHub Actions not to run
166+
# push-triggered workflows on the marker commit itself — the
167+
# release just built the artifacts, there's nothing to re-verify.
157168
{
158-
printf 'chore(release): Open Install Library Release %s, %s\n\n' "$TAG" "$RELEASE_DATE"
169+
printf 'chore(release): OIL %s, %s\n\n' "$TAG" "$RELEASE_DATE"
159170
if [ -n "$PREV" ]; then
160171
printf 'Changes since %s:\n\n' "$PREV"
161-
git log --no-merges --pretty=format:'- %s (%h)' "${PREV}..${TAG}"
172+
git log \
173+
--no-merges \
174+
--invert-grep \
175+
--extended-regexp \
176+
--grep='^chore\(release\): (OIL|Open Install Library Release) v[0-9]' \
177+
--pretty=format:'- %s (%h)' \
178+
"${PREV}..${TAG}"
162179
printf '\n\n'
163180
fi
164-
printf 'Release: %s\n' "${RELEASE_URL}"
181+
printf 'Release: %s\n\n' "${RELEASE_URL}"
182+
printf '[skip ci]\n'
165183
} > /tmp/commit-msg.txt
166184
167185
echo "----- Commit message preview -----"

0 commit comments

Comments
 (0)