-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (39 loc) · 1.73 KB
/
Copy pathchangeset-check.yml
File metadata and controls
42 lines (39 loc) · 1.73 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
name: Changeset Check
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
jobs:
conflicts:
name: no merge conflicts
uses: ./.github/workflows/conflict-check.yml
with:
base_ref: ${{ github.event.pull_request.base.ref }}
head_sha: ${{ github.event.pull_request.head.sha }}
require-changeset:
needs: conflicts
if: github.head_ref != 'changeset-release/main'
name: a publishable-package change needs a changeset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: denoland/setup-deno@v2
# The gate's verdict is computed by the lockfile-installed turbo —
# the same binary `pnpm check` uses. No registry fetch at verdict time.
- uses: ./.github/actions/install-deps
# The gate's own fixtures first, so a broken gate fails as itself rather
# than as a verdict about the PR. No subprocesses and no writes: the
# selftest reads the lockfile and the installed turbo manifest only.
- name: Changeset gate selftest
run: deno run --allow-read scripts/guards/check-changeset.ts --selftest
# The base argument is the event's pinned base SHA, never a moving ref:
# a merge landing on the base branch between event and check cannot
# change what this PR is judged against. The turbo grant is the exact
# shim path — the same object the gate's lstat and pin check see.
- name: Require a changeset for publishable-package changes
run: >-
deno run --allow-run=git,"$PWD/node_modules/.bin/turbo" --allow-read --allow-write=/tmp
scripts/guards/check-changeset.ts ${{ github.event.pull_request.base.sha }}