Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
publish: pnpm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 11 additions & 0 deletions scripts/check-compat-matrix.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';

const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const packageJson = JSON.parse(await readFile(path.join(repoRoot, 'package.json'), 'utf8'));

function formatPair({ next, react }) {
return `Next.js ${next} / React ${react}`;
Expand Down Expand Up @@ -82,4 +83,14 @@ if (/SMOKE_NEXT"\s*=\s*"16\.\d+\.\d+"/.test(releaseWorkflow)) {
);
}

if (!releaseWorkflow.includes('publish: pnpm run publish')) {
throw new Error(
'.github/workflows/release.yml changesets/action must run the root publish script so release PR merges actually publish packages.'
);
}

if (packageJson.scripts?.publish !== 'changeset publish') {
throw new Error('package.json publish script must run `changeset publish`.');
}

console.log(`Compatibility matrices are in sync:\n${formatPairs(readmePairs)}`);
Loading