Skip to content

Commit 3dd50d4

Browse files
committed
Skip registry workflow on changesets
1 parent d16ea6d commit 3dd50d4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/registry.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,39 @@ jobs:
3333
fetch-depth: 0
3434
token: ${{ secrets.API_TOKEN_GITHUB || secrets.GITHUB_TOKEN }}
3535

36+
- name: 🔎 Detect changesets in push
37+
id: changesets
38+
run: |
39+
if git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" | rg -q '^\\.changeset/'; then
40+
echo "present=true" >> "$GITHUB_OUTPUT"
41+
else
42+
echo "present=false" >> "$GITHUB_OUTPUT"
43+
fi
44+
3645
- name: ♻️ Setup Node.js
46+
if: ${{ steps.changesets.outputs.present != 'true' }}
3747
uses: actions/setup-node@v4
3848
with:
3949
node-version: 22
4050

4151
- name: 📦 Monorepo install
52+
if: ${{ steps.changesets.outputs.present != 'true' }}
4253
uses: ./.github/actions/pnpm-install
4354
with:
4455
link-workspace-packages: 'true'
4556

4657
- name: 🔧 Configure git
58+
if: ${{ steps.changesets.outputs.present != 'true' }}
4759
run: |
4860
git config user.name "github-actions[bot]"
4961
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
5062
5163
- name: 🏗 Build Registry
64+
if: ${{ steps.changesets.outputs.present != 'true' }}
5265
run: pnpm --filter www build:registry && pnpm --filter www build:tw
5366

5467
- name: ◻️ Create Pull Request
68+
if: ${{ steps.changesets.outputs.present != 'true' }}
5569
uses: peter-evans/create-pull-request@v7
5670
with:
5771
token: ${{ secrets.API_TOKEN_GITHUB || secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)