fix(release): Restore web-app install for npm publish
Install apps/web-app dependencies in the publish workflow before the\nfrontend build so CI matches the working Pages pipeline.\n\nHarden the maintainer release suite by adding the same install step\nbefore app:build, and switch the shared app:install helper to npm ci\nfor deterministic installs.\n\nDocument the follow-up patch release in the changelog so 8.7.1 can\npublish the 8.7.x line to npm after the 8.7.0 release failed before\nreaching the registry.
This commit is contained in:
@@ -115,6 +115,7 @@ function runReleaseSuite(projectRoot) {
|
||||
runCommand("npm", ["run", "validate:references"], projectRoot);
|
||||
runCommand("npm", ["run", "sync:release-state"], projectRoot);
|
||||
runCommand("npm", ["run", "test"], projectRoot);
|
||||
runCommand("npm", ["run", "app:install"], projectRoot);
|
||||
runCommand("npm", ["run", "app:build"], projectRoot);
|
||||
runCommand("npm", ["pack", "--dry-run", "--json"], projectRoot);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ const packageJson = JSON.parse(readText("package.json"));
|
||||
const generatedFiles = JSON.parse(readText("tools/config/generated-files.json"));
|
||||
const ciWorkflow = readText(".github/workflows/ci.yml");
|
||||
const publishWorkflow = readText(".github/workflows/publish-npm.yml");
|
||||
const releaseWorkflowScript = readText("tools/scripts/release_workflow.js");
|
||||
const hygieneWorkflowPath = path.join(repoRoot, ".github", "workflows", "repo-hygiene.yml");
|
||||
|
||||
assert.ok(
|
||||
@@ -50,6 +51,11 @@ assert.match(
|
||||
/check:warning-budget/,
|
||||
"sync:repo-state should enforce the frozen validation warning budget",
|
||||
);
|
||||
assert.strictEqual(
|
||||
packageJson.scripts["app:install"],
|
||||
"cd apps/web-app && npm ci",
|
||||
"app:install should use npm ci for deterministic web-app installs",
|
||||
);
|
||||
|
||||
for (const filePath of [
|
||||
"apps/web-app/public/sitemap.xml",
|
||||
@@ -129,6 +135,11 @@ assert.match(
|
||||
);
|
||||
|
||||
assert.match(publishWorkflow, /run: npm ci/, "npm publish workflow should install dependencies");
|
||||
assert.match(
|
||||
publishWorkflow,
|
||||
/run: npm run app:install/,
|
||||
"npm publish workflow should install web-app dependencies before building",
|
||||
);
|
||||
assert.match(
|
||||
publishWorkflow,
|
||||
/run: npm run sync:release-state/,
|
||||
@@ -141,6 +152,11 @@ assert.match(
|
||||
);
|
||||
assert.match(publishWorkflow, /run: npm run test/, "npm publish workflow should run tests before publish");
|
||||
assert.match(publishWorkflow, /run: npm run app:build/, "npm publish workflow should build the app before publish");
|
||||
assert.match(
|
||||
releaseWorkflowScript,
|
||||
/runCommand\("npm", \["run", "app:install"\], projectRoot\);[\s\S]*runCommand\("npm", \["run", "app:build"\], projectRoot\);/,
|
||||
"release workflow should install web-app dependencies before building the app",
|
||||
);
|
||||
assert.match(
|
||||
publishWorkflow,
|
||||
/npm pack --dry-run --json/,
|
||||
|
||||
Reference in New Issue
Block a user