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
8 changes: 8 additions & 0 deletions .github/workflows/examples-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ on:
- examples/**
- scripts/examples-smoke/**
- .github/workflows/examples-smoke.yml
- packages/**
- package.json
- pnpm-lock.yaml
pull_request:
branches:
- main
paths:
- examples/**
- scripts/examples-smoke/**
- .github/workflows/examples-smoke.yml
- packages/**
- package.json
- pnpm-lock.yaml
schedule:
- cron: 0 3 * * *
workflow_dispatch: {}
permissions:
contents: read
Expand Down
5 changes: 4 additions & 1 deletion scripts/examples-smoke/build-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ function writeRootPackageJson(
}

function buildNpmSingle(out: string, tarballNames: Record<string, string>): 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<string, string>): void {
Expand Down
19 changes: 17 additions & 2 deletions scripts/examples-smoke/generate-smoke-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,32 @@ export function buildWorkflow(): Record<string, unknown> {
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' },
Expand Down
Loading