From a0bad7b41c9af78dbb4f4ffa6d01293dce3473d1 Mon Sep 17 00:00:00 2001 From: anson Date: Fri, 10 Oct 2025 15:48:42 +0100 Subject: [PATCH] ci(release): ensure Changesets uses naga tip; conditionally clean release branch --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c0fa1b6a..ddf34f4e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,8 +118,14 @@ jobs: - name: Reset release branch base run: | + BRANCH="${{ github.event.workflow_run.head_branch }}" git fetch --no-tags --prune origin - git push origin :changeset-release/${{ github.event.workflow_run.head_branch }} || true + if git ls-remote --heads origin "changeset-release/$BRANCH" | grep -q .; then + git push origin :changeset-release/$BRANCH + echo "Deleted remote release branch changeset-release/$BRANCH" + else + echo "Remote release branch changeset-release/$BRANCH not found; nothing to delete" + fi - name: Create Release Pull Request or Publish to npm id: changesets @@ -130,7 +136,6 @@ jobs: publish: pnpm changeset publish --access public commit: 'chore(release): version packages' title: 'chore(release): version packages' - commitMode: github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}