Skip to content

Commit f71052d

Browse files
ascorbicbluwy
andauthored
ci: fetch changeset base branch when snapshot (#12508)
* ci: fetch changeset base branch * Update .github/workflows/snapshot-release.yml Co-authored-by: Bjorn Lu <[email protected]> * Remove redundant changeset pre exit command * Fix indentation in snapshot-release workflow --------- Co-authored-by: Bjorn Lu <[email protected]>
1 parent 6fc29e3 commit f71052d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/snapshot-release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ jobs:
6363
ref: ${{ steps.refs.outputs.head_ref }}
6464
fetch-depth: 0
6565

66-
- run: git fetch origin main:main
66+
- name: Extract base branch from .changeset/config.json
67+
id: getBaseBranch
68+
run: |
69+
baseBranch=$(jq -r '.baseBranch' .changeset/config.json)
70+
echo "baseBranch=${baseBranch}" >> $GITHUB_OUTPUT
71+
72+
- run: git fetch origin ${{ steps.getBaseBranch.outputs.baseBranch }}:${{ steps.getBaseBranch.outputs.baseBranch }}
6773

6874
- name: Setup PNPM
6975
uses: pnpm/action-setup@v3

0 commit comments

Comments
 (0)