Skip to content

Commit

Permalink
ci: fetch changeset base branch when snapshot (#12508)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
ascorbic and bluwy authored Nov 27, 2024
1 parent 6fc29e3 commit f71052d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f71052d

Please sign in to comment.