aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/preview-release.yml23
1 files changed, 20 insertions, 3 deletions
diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml
index f3542edd1..6a3a967ce 100644
--- a/.github/workflows/preview-release.yml
+++ b/.github/workflows/preview-release.yml
@@ -37,9 +37,26 @@ jobs:
steps:
- name: Disable git crlf
run: git config --global core.autocrlf false
-
- - name: Checkout
- uses: actions/checkout@v4
+
+
+ - name: resolve pr refs
+ id: refs
+ uses: eficode/resolve-pr-refs@main
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ steps.refs.outputs.head_ref }}
+ fetch-depth: 0
+
+ - 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