diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63498b6..0514562 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,3 +19,12 @@ jobs: - run: npm run lint - run: npm run typecheck - run: npm run test:ci + - run: npm run build + - name: Built CLI prints top-level help + run: | + node dist/index.js --help > "$RUNNER_TEMP/help.txt" 2>&1 || { status=$?; echo "built CLI exited $status — see output below"; cat "$RUNNER_TEMP/help.txt"; exit 1; } + grep -q '^Usage: markpost ' "$RUNNER_TEMP/help.txt" || { echo "top-level usage line changed — update ci.yml or HELP_TEXT in src/index.ts"; cat "$RUNNER_TEMP/help.txt"; exit 1; } + env: + # conf -> env-paths reads XDG_CONFIG_HOME on Linux only; this keeps the + # help smoke test off any real config store. Revisit if runs-on changes. + XDG_CONFIG_HOME: ${{ runner.temp }}/markpost-config