File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,14 @@ jobs:
118118
119119 - name : Reset release branch base
120120 run : |
121+ BRANCH="${{ github.event.workflow_run.head_branch }}"
121122 git fetch --no-tags --prune origin
122- git push origin :changeset-release/${{ github.event.workflow_run.head_branch }} || true
123+ if git ls-remote --heads origin "changeset-release/$BRANCH" | grep -q .; then
124+ git push origin :changeset-release/$BRANCH
125+ echo "Deleted remote release branch changeset-release/$BRANCH"
126+ else
127+ echo "Remote release branch changeset-release/$BRANCH not found; nothing to delete"
128+ fi
123129
124130 - name : Create Release Pull Request or Publish to npm
125131 id : changesets
@@ -130,7 +136,6 @@ jobs:
130136 publish : pnpm changeset publish --access public
131137 commit : ' chore(release): version packages'
132138 title : ' chore(release): version packages'
133- commitMode : github
134139 env :
135140 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
136141 NODE_AUTH_TOKEN : ${{ secrets.NODE_AUTH_TOKEN }}
You can’t perform that action at this time.
0 commit comments