chore(ci): harden supply-chain controls before reopening PRs
Isolate npm publish from PR CI, enforce frozen lockfiles and a 24h minimumReleaseAge, and document safe pull_request_target usage so fork PRs cannot reach publish credentials. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
This commit is contained in:
committed by
Rotimi Best
co-authored by
Rotimi Best
parent
bbf5eb24de
commit
9adc38bd8a
@@ -0,0 +1,44 @@
|
||||
name: MCP package build check
|
||||
|
||||
# Verifies @classroomio/mcp still builds on PRs/pushes that touch it.
|
||||
# Intentionally separate from publish-mcp.yml so PR CI never sees NPM_TOKEN.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/mcp/**'
|
||||
- 'packages/question-types/**'
|
||||
- 'packages/utils/**'
|
||||
- 'pnpm-lock.yaml'
|
||||
- '.github/workflows/mcp-package-build-check.yml'
|
||||
push:
|
||||
paths:
|
||||
- 'packages/mcp/**'
|
||||
- 'packages/question-types/**'
|
||||
- 'packages/utils/**'
|
||||
- 'pnpm-lock.yaml'
|
||||
- '.github/workflows/mcp-package-build-check.yml'
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.19.3
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build publishable MCP package
|
||||
run: pnpm mcp:build
|
||||
Reference in New Issue
Block a user