-
Notifications
You must be signed in to change notification settings - Fork 8
29 lines (25 loc) · 929 Bytes
/
changeset-check.yml
File metadata and controls
29 lines (25 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Changeset check
on:
pull_request:
branches: [main]
jobs:
changeset:
# Skip the auto-generated release PR opened by the changesets action.
if: ${{ !startsWith(github.head_ref, 'changeset-release/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Check out the PR head directly (not the synthetic merge commit)
# so `HEAD` and `pull_request.head.sha` agree, and full history
# so the merge-base with `base.sha` is reachable.
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Verify changesets cover affected packages
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: node .github/scripts/check-changesets.mjs