File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -246,32 +246,21 @@ jobs:
246246
247247 BRANCH_NAME="release-agents-v${NEW_VERSION}"
248248
249- # Check if release PR branch already exists
250- if git ls-remote --exit-code --heads origin "$BRANCH_NAME" >/dev/null 2>&1; then
251- echo "Branch $BRANCH_NAME already exists, updating it"
252- git fetch origin "$BRANCH_NAME"
253- git checkout "$BRANCH_NAME"
254- git reset --hard origin/main
255- else
256- echo "Creating new branch $BRANCH_NAME"
257- git checkout -b "$BRANCH_NAME"
258- fi
249+ # Create branch from current HEAD (which is main)
250+ git checkout -B "$BRANCH_NAME"
259251
260252 # Stage changes
261253 git add rust/main/Cargo.toml rust/main/CHANGELOG.md
262254
263- # Commit if there are changes
264- if git diff --staged --quiet; then
265- echo "No changes to commit"
266- else
267- git commit -m "chore(release): prepare agents v${NEW_VERSION}
255+ # Commit changes
256+ git commit -m "chore(release): prepare agents v${NEW_VERSION}
268257
269258 This is a $BUMP_TYPE version bump for the Hyperlane agents.
270259
271260 Changes will be released as agents-v${NEW_VERSION} after this PR is merged."
272261
273- git push -f origin "$BRANCH_NAME"
274- fi
262+ # Force push to obliterate any existing branch
263+ git push -f origin "$BRANCH_NAME"
275264
276265 # Create or update PR
277266 PR_BODY="## Release agents v${NEW_VERSION}
You can’t perform that action at this time.
0 commit comments