You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/release-pr.yml
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ jobs:
70
70
VERSION="${MAJOR}.${MINOR}.${PATCH}"
71
71
echo "WARNING: No conventional commits detected — falling back to patch bump: $VERSION"
72
72
else
73
-
echo "::warning::No conventional commits and no existing tags — nothing to release"
73
+
echo "::error::No conventional commits and no existing tags — nothing to release"
74
74
exit 1
75
75
fi
76
76
fi
@@ -109,7 +109,7 @@ jobs:
109
109
110
110
# Check if branch already exists (local or remote)
111
111
if git ls-remote --exit-code --heads origin "$BRANCH" &>/dev/null; then
112
-
echo "::warning::Branch '$BRANCH' already exists. A release PR may already be open — close it and delete the branch to re-run."
112
+
echo "::error::Branch '$BRANCH' already exists. A release PR may already be open — close it and delete the branch to re-run."
113
113
exit 1
114
114
fi
115
115
@@ -118,24 +118,24 @@ jobs:
118
118
119
119
git add CHANGELOG.md
120
120
if git diff --cached --quiet CHANGELOG.md; then
121
-
echo "No changes to CHANGELOG.md"
121
+
echo "::error::No releasable commits since last tag – CHANGELOG.md is already up to date. Push new conventional commits or adjust the requested version before rerunning this workflow."
122
122
exit 1
123
123
fi
124
124
125
125
git checkout -b "$BRANCH"
126
126
git commit -m "docs: update changelog for $TAG"
127
127
git push origin "$BRANCH"
128
128
129
-
LABEL_FLAG=""
129
+
label_args=()
130
130
for LABEL in "release"; do
131
131
if gh label list --search "$LABEL" --json name --jq '.[].name' | grep -qx "$LABEL"; then
132
-
LABEL_FLAG="$LABEL_FLAG --label$LABEL"
132
+
label_args+=("--label" "$LABEL")
133
133
fi
134
134
done
135
135
136
136
# Draft PR because the github-actions[bot] does not trigger a pull_request_target workflow
137
137
gh pr create \
138
-
--title "docs: update changelog for $BRANCH" \
138
+
--title "docs: update changelog for $TAG" \
139
139
--draft \
140
140
--body "$(cat <<EOF
141
141
# Release $TAG
@@ -169,4 +169,4 @@ jobs:
169
169
After both workflows complete, review and publish the draft release.
0 commit comments