Skip to content

Commit a2bc550

Browse files
committed
fix(ci): rebase before push in release workflow
1 parent b3d5eb5 commit a2bc550

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release-reusable.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,14 @@ jobs:
158158
159159
git add -A
160160
git commit -m "chore(release): version packages"
161-
git push origin "HEAD:${{ inputs.branch }}"
161+
BRANCH="${{ inputs.branch }}"
162+
git fetch origin "${BRANCH}"
163+
git rebase "origin/${BRANCH}"
164+
if ! git push origin "HEAD:${BRANCH}"; then
165+
git fetch origin "${BRANCH}"
166+
git rebase "origin/${BRANCH}"
167+
git push origin "HEAD:${BRANCH}"
168+
fi
162169
163170
- name: Tag release
164171
if: steps.auto_changeset.outputs.has_changeset == 'true' && github.actor != 'github-actions[bot]'

0 commit comments

Comments
 (0)