summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matt Kane <m@mk.gg> 2024-11-27 11:34:44 +0000
committerGravatar GitHub <noreply@github.com> 2024-11-27 11:34:44 +0000
commitf71052df0137d8a60f98c2121495ef4cc9343727 (patch)
treebd0c5585bff6196b9a6cf06f4b36ec57a2f65b5d
parent6fc29e3c24a23774d2bd960028716a660d3e9b53 (diff)
downloadastro-f71052df0137d8a60f98c2121495ef4cc9343727.tar.gz
astro-f71052df0137d8a60f98c2121495ef4cc9343727.tar.zst
astro-f71052df0137d8a60f98c2121495ef4cc9343727.zip
ci: fetch changeset base branch when snapshot (#12508)
* ci: fetch changeset base branch * Update .github/workflows/snapshot-release.yml Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> * Remove redundant changeset pre exit command * Fix indentation in snapshot-release workflow --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
-rw-r--r--.github/workflows/snapshot-release.yml8
1 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml
index ae8d3060f..612ca32a7 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