diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index ae8d3060fa82..612ca32a7454 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -63,7 +63,13 @@ jobs: ref: ${{ steps.refs.outputs.head_ref }} fetch-depth: 0 - - run: git fetch origin main:main + - name: Extract base branch from .changeset/config.json + id: getBaseBranch + run: | + baseBranch=$(jq -r '.baseBranch' .changeset/config.json) + echo "baseBranch=${baseBranch}" >> $GITHUB_OUTPUT + + - run: git fetch origin ${{ steps.getBaseBranch.outputs.baseBranch }}:${{ steps.getBaseBranch.outputs.baseBranch }} - name: Setup PNPM uses: pnpm/action-setup@v3