0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

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>
This commit is contained in:
Matt Kane 2024-11-27 11:34:44 +00:00 committed by GitHub
parent 6fc29e3c24
commit f71052df01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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