diff --git a/.github/workflows/examples-smoke.yml b/.github/workflows/examples-smoke.yml index a9295063..55f5e91e 100644 --- a/.github/workflows/examples-smoke.yml +++ b/.github/workflows/examples-smoke.yml @@ -22,6 +22,9 @@ on: - examples/** - scripts/examples-smoke/** - .github/workflows/examples-smoke.yml + - packages/** + - package.json + - pnpm-lock.yaml pull_request: branches: - main @@ -29,6 +32,11 @@ on: - examples/** - scripts/examples-smoke/** - .github/workflows/examples-smoke.yml + - packages/** + - package.json + - pnpm-lock.yaml + schedule: + - cron: 0 3 * * * workflow_dispatch: {} permissions: contents: read diff --git a/scripts/examples-smoke/build-fixture.ts b/scripts/examples-smoke/build-fixture.ts index 1a73fae2..8dabae2d 100644 --- a/scripts/examples-smoke/build-fixture.ts +++ b/scripts/examples-smoke/build-fixture.ts @@ -110,7 +110,10 @@ function writeRootPackageJson( } function buildNpmSingle(out: string, tarballNames: Record): void { - writeRootPackageJson(out, 'smoke-consumer', {}, tarballNames); + // A single-package consumer's one package IS the publishable one, so it must not be `private`. + // writeRootPackageJson defaults `private: true` for the monorepo roots (where only members ship), + // but a private single package is skipped at discovery — leaving nothing to release. + writeRootPackageJson(out, 'smoke-consumer', { private: false }, tarballNames); } function buildNpmMonorepo(out: string, tarballNames: Record): void { diff --git a/scripts/examples-smoke/generate-smoke-workflow.ts b/scripts/examples-smoke/generate-smoke-workflow.ts index 1a01609b..23d9058d 100644 --- a/scripts/examples-smoke/generate-smoke-workflow.ts +++ b/scripts/examples-smoke/generate-smoke-workflow.ts @@ -215,17 +215,32 @@ export function buildWorkflow(): Record { jobs[`smoke-${scenario.id}`] = smokeJob(scenario); } + // The smoke exercises `releasekit release`, so it must also run when that release code — or the + // dependencies it resolves — changes, not just the examples/harness; otherwise a regression in + // release logic can break the smoke without ever re-triggering it. + const triggerPaths = [ + 'examples/**', + 'scripts/examples-smoke/**', + '.github/workflows/examples-smoke.yml', + 'packages/**', + 'package.json', + 'pnpm-lock.yaml', + ]; + return { name: 'Examples Smoke', on: { push: { branches: ['main'], - paths: ['examples/**', 'scripts/examples-smoke/**', '.github/workflows/examples-smoke.yml'], + paths: [...triggerPaths], }, pull_request: { branches: ['main'], - paths: ['examples/**', 'scripts/examples-smoke/**', '.github/workflows/examples-smoke.yml'], + paths: [...triggerPaths], }, + // Nightly backstop on main: catches regressions the path filters miss (transitive dep bumps, + // runner-image drift) within a day. + schedule: [{ cron: '0 3 * * *' }], workflow_dispatch: {}, }, permissions: { contents: 'read' },