Skip to content

Commit b8d1d5e

Browse files
committed
fix(ci): use bash parameter expansion to extract first commit line
1 parent 1d383b6 commit b8d1d5e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/release-please.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
7777
run: |
7878
# Take only the first line to avoid git trailers (e.g. Co-authored-by) breaking $GITHUB_OUTPUT
79-
FIRST_LINE=$(echo "$COMMIT_MESSAGE" | head -1)
79+
FIRST_LINE=${COMMIT_MESSAGE%%$'\n'*}
8080
echo "version=$( echo "$FIRST_LINE" | sed 's/^release: v\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT
8181
echo "pr_number=$( echo "$FIRST_LINE" | sed 's/.*(\#\([0-9]\+\)).*$/\1/' )" >> $GITHUB_OUTPUT
8282
echo "release_branch=release/v$( echo "$FIRST_LINE" | sed 's/^release: v\([0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)