Skip to content

Commit badad0d

Browse files
authored
Merge pull request #942 from LIT-Protocol/fix/naga-release-2
ci(release): ensure Changesets uses naga tip; conditionally clean rel…
2 parents 0eb64a1 + a0bad7b commit badad0d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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 }}

0 commit comments

Comments
 (0)