-
Notifications
You must be signed in to change notification settings - Fork 35
63 lines (54 loc) · 2.12 KB
/
Copy pathverify-changesets.yml
File metadata and controls
63 lines (54 loc) · 2.12 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Verify changesets
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
# Advisory check: runs `changeset status` and surfaces the result in the
# CI summary panel. A missing changeset is flagged but does not block merge.
permissions:
contents: read
concurrency:
group: verify-changesets-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
status:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci --no-audit --no-fund
- name: Release-doc invariants (CHANGELOG bullet shape; CLAUDE.md symlink; config shape)
run: npm run check:release-docs
- name: Release-doc invariant tests (positive + negative path)
run: npm run test:release-docs
- id: status
continue-on-error: true
run: npx --no -- changeset status --since=origin/${{ github.event.pull_request.base.ref }} | tee status.txt
- name: Summary
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
run: |
{
echo "## Changesets status"
if [ "${{ steps.status.outcome }}" = "success" ]; then
echo "Changeset coverage looks fine."
else
echo "No changesets detected on a PR that touches workspace packages."
echo ""
echo "Run \`npm run changeset\` and commit the resulting file, or skip if this PR only touches docs / CI / refactors. Rules: ${REPO_URL}/blob/main/docs/development/release-notes.md"
fi
echo ""
echo "<details><summary>changeset status</summary>"
echo ""
echo '```'
cat status.txt 2>/dev/null || true
echo '```'
echo ""
echo "</details>"
} >> "$GITHUB_STEP_SUMMARY"