@theholocron/astromech 5.1.0 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +5 -40
- package/dist/index.mjs +170 -590
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -302,27 +302,13 @@ export declare const DOT_GITHUB_REPO = "theholocron/.github";
|
|
|
302
302
|
export declare const HOLOCRON_REPO = "theholocron/holocron";
|
|
303
303
|
/** How the templates spell a reference. Never emitted as it is, and never to be changed: {@link rehome} reads it. */
|
|
304
304
|
export declare const TEMPLATE_HOME: CiHome;
|
|
305
|
-
/**
|
|
306
|
-
* Whether a caller that calls its reusables at `home` keeps the names it had before they became the task id (the
|
|
307
|
-
* legacy-name gate): while 'home' is the frozen copies on `main`, the callers of a repo other than the one that hosts
|
|
308
|
-
* the reusables keep their old workflow, job and file names, because their rulesets list the checks those post. `ci-v1`
|
|
309
|
-
* has only flat names, so the gate is open there and every caller is flat (spec `ci-flat-task-vocabulary`, phase K).
|
|
310
|
-
*/
|
|
311
|
-
export declare function legacyGate(home?: CiHome): boolean;
|
|
312
305
|
/**
|
|
313
306
|
* `text` with every reference to a hosted reusable workflow at `home` rewritten to the file in the same checkout
|
|
314
|
-
* (`./.github/workflows/<name>.yml
|
|
307
|
+
* (`./.github/workflows/<name>.yml`). For the repo that serves the reusables: its own callers then run the reusable at
|
|
315
308
|
* their own commit, so a PR that edits one exercises it. Composite actions are left on their full ref, because a
|
|
316
309
|
* reusable called from another repository cannot see this checkout.
|
|
317
310
|
*/
|
|
318
311
|
export declare function localize(text: string, home?: CiHome): string;
|
|
319
|
-
/**
|
|
320
|
-
* `text` with each reference to a hosted composite action in `names` at `home` rewritten to its folder in the same
|
|
321
|
-
* checkout (`./ci/actions/<name>`). For the written copy of a reusable in the repo that hosts it, which only that
|
|
322
|
-
* repo's own callers run: a change to the action then takes effect at the PR's own commit, instead of waiting for
|
|
323
|
-
* the frozen copy in `theholocron/.github` that `home` still names. An action not in `names` keeps its full ref.
|
|
324
|
-
*/
|
|
325
|
-
export declare function localizeActions(text: string, names: readonly string[], home?: CiHome): string;
|
|
326
312
|
/**
|
|
327
313
|
* How strictly a repo enforces doc-comment coverage of its public API (`repoValidation.docsCoverage`, spec
|
|
328
314
|
* `tech-api-docs`): `off` (the default) does nothing, `warn` reports without failing and posts informational Codecov
|
|
@@ -1480,25 +1466,11 @@ export declare function isTask(name: string, id: string): boolean;
|
|
|
1480
1466
|
* old dotted names that are still accepted. What a config validator checks a `tasks:` entry against.
|
|
1481
1467
|
*/
|
|
1482
1468
|
export declare const KNOWN_TASKS: ReadonlySet<string>;
|
|
1483
|
-
/**
|
|
1484
|
-
* The thin caller `yaml` of task `id` spelled with the names it had before they became the task id: the old workflow
|
|
1485
|
-
* `name:` and the old id and `name:` of each job. This is the legacy-name gate (spec `ci-flat-task-vocabulary`, phase
|
|
1486
|
-
* F): a repo whose callers still call the frozen reusables in `theholocron/.github` keeps the checks its ruleset lists,
|
|
1487
|
-
* so only the repo that hosts the reusables (and, later, every repo once `CI_HOME` is `ci-v1`) gets the flat names.
|
|
1488
|
-
* An id with no old spelling is returned as it is. Only a job `name:` that is the id is rewritten, so a name a caller
|
|
1489
|
-
* builds itself (the grouped release's matrix name) is left to the entry's `replace`.
|
|
1490
|
-
*/
|
|
1491
|
-
export declare function legacyCaller(id: string, yaml: string): string;
|
|
1492
|
-
/**
|
|
1493
|
-
* The file name a thin caller of task `id` has while callers are legacy-named (see `legacyCaller`): the old task name
|
|
1494
|
-
* and `.yml`, `verification.unitTests.yml` for `test:unit`. An id with no old name (`preview`) keeps its own.
|
|
1495
|
-
*/
|
|
1496
|
-
export declare function legacyCallerFile(id: string): string;
|
|
1497
1469
|
/**
|
|
1498
1470
|
* The old file name of a flat reusable workflow — `test-unit.yml` is `verification.unitTests.yml`. The frozen copies in
|
|
1499
|
-
* `theholocron/.github` keep the old names and exist only there, so
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1471
|
+
* `theholocron/.github` keep the old names and exist only there, so the path of a frozen copy, and of a workflow that
|
|
1472
|
+
* is still dispatched there by name, is spelled with it (spec `ci-flat-task-vocabulary`). A file with no old name
|
|
1473
|
+
* (`preview.yml`, `ci.yml`) is returned as it is.
|
|
1502
1474
|
*/
|
|
1503
1475
|
export declare function legacyFile(file: string): string;
|
|
1504
1476
|
/**
|
|
@@ -1508,13 +1480,6 @@ export declare function legacyFile(file: string): string;
|
|
|
1508
1480
|
* `format` and the other formatting successors share the formatting workflow's name.
|
|
1509
1481
|
*/
|
|
1510
1482
|
export declare function legacyName(id: string): string | undefined;
|
|
1511
|
-
/**
|
|
1512
|
-
* The key of the workflow that carries `name` in a repo that still calls the frozen reusables in `theholocron/.github`
|
|
1513
|
-
* (the legacy-name gate): a flat id that shared an old workflow with others (`lint:markdown` and `format` with
|
|
1514
|
-
* `lint:editorconfig`, the old `sourceQuality.formatting`) maps to the first of them, because only that one has a
|
|
1515
|
-
* frozen reusable. Every other name is its own key, an old name mapping to its first successor.
|
|
1516
|
-
*/
|
|
1517
|
-
export declare function legacyWorkflowKey(name: string): string;
|
|
1518
1483
|
/**
|
|
1519
1484
|
* Script names npm and pnpm give a meaning of their own, so no task may be named like one (spec
|
|
1520
1485
|
* `ci-flat-task-vocabulary`, "npm lifecycle and package-manager names"): `pnpm publish` runs a script called `publish`
|
|
@@ -1562,7 +1527,7 @@ export declare function taskKey(name: string, id: string): string;
|
|
|
1562
1527
|
* the workflow that carries it. A flat id is its own key; an old name maps to the first id that replaced it
|
|
1563
1528
|
* (`sourceQuality.formatting` is `lint:editorconfig`); a task with no workflow of its own maps to the workflow that
|
|
1564
1529
|
* runs its check (`format` is `lint:code`, see `TaskDef.host`); a name with no old name (`preview`, an unknown one) is
|
|
1565
|
-
* its own key.
|
|
1530
|
+
* its own key.
|
|
1566
1531
|
*/
|
|
1567
1532
|
export declare function workflowKey(name: string): string;
|
|
1568
1533
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -352,6 +352,142 @@ function requiredChecksVerdict(input) {
|
|
|
352
352
|
...names
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
+
// src/generators/ci-ref/ci-ref.ts
|
|
356
|
+
/**
|
|
357
|
+
* The org slug a CLI user gets when no config names one. Where a resolved config is in reach, `config.org` is the
|
|
358
|
+
* source and this is only the fallback; a command with no config (`new repo`, `sync github`, `publish --sync-trust`)
|
|
359
|
+
* uses it as it is.
|
|
360
|
+
*/
|
|
361
|
+
const DEFAULT_ORG = "theholocron";
|
|
362
|
+
/** The `owner/repo` of the org's `.github` repo, which hosts the frozen reusable workflows (and Sentinel's dispatch target). */
|
|
363
|
+
const DOT_GITHUB_REPO = `${DEFAULT_ORG}/.github`;
|
|
364
|
+
/** The `owner/repo` of this monorepo, where the CLI, the reusables' sources and the Trusted Publisher config live. */
|
|
365
|
+
const HOLOCRON_REPO = `${DEFAULT_ORG}/holocron`;
|
|
366
|
+
/** How the templates spell a reference. Never emitted as it is, and never to be changed: {@link rehome} reads it. */
|
|
367
|
+
const TEMPLATE_HOME = {
|
|
368
|
+
workflows: `${DOT_GITHUB_REPO}/.github/workflows`,
|
|
369
|
+
actions: `${DOT_GITHUB_REPO}/.github/actions`,
|
|
370
|
+
ref: "main"
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Where the hosted files live and the tag generated callers pin them to: `theholocron/holocron` at `ci-v1`, the tag the
|
|
374
|
+
* first release of the `ci` group makes on the promoted `main`. Only flat names, and `ci.yml`, exist there. The repo
|
|
375
|
+
* that serves the files calls them by path instead ({@link localize}).
|
|
376
|
+
*/
|
|
377
|
+
const CI_TARGET = {
|
|
378
|
+
workflows: `${HOLOCRON_REPO}/.github/workflows`,
|
|
379
|
+
actions: `${HOLOCRON_REPO}/ci/actions`,
|
|
380
|
+
ref: "ci-v1"
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Where generated workflows call the hosted files: {@link CI_TARGET}. It was {@link TEMPLATE_HOME}, the frozen copies in
|
|
384
|
+
* `theholocron/.github` at `main`, until the tag existed (spec `ci-flat-task-vocabulary`, phase K); moving the home is a
|
|
385
|
+
* change to this constant alone (spec `tech-workflows-in-holocron`, issue #1474).
|
|
386
|
+
*/
|
|
387
|
+
const CI_HOME = { ...CI_TARGET };
|
|
388
|
+
const REFERENCE = /theholocron\/\.github\/\.github\/(workflows|actions)\/([\w.-]+)@main/g;
|
|
389
|
+
/** `text` with every hosted-workflow and hosted-action reference moved from the templates' spelling to `home`. */
|
|
390
|
+
function rehome(text, home = CI_HOME) {
|
|
391
|
+
return text.replace(REFERENCE, (_all, kind, name) => `${home[kind]}/${name}@${home.ref}`);
|
|
392
|
+
}
|
|
393
|
+
/** {@link rehome} applied to every value of a map of templates. */
|
|
394
|
+
function rehomeAll(templates, home = CI_HOME) {
|
|
395
|
+
return Object.fromEntries(Object.entries(templates).map(([name, text]) => [name, rehome(text, home)]));
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* A `uses:` value for a hosted reusable workflow, for generated YAML that is not written in a template. `file` is the
|
|
399
|
+
* flat name (`deploy.yml`).
|
|
400
|
+
*/
|
|
401
|
+
function reusableWorkflowRef(file, home = CI_HOME) {
|
|
402
|
+
return `${home.workflows}/${file}@${home.ref}`;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* `text` with every reference to a hosted reusable workflow at `home` rewritten to the file in the same checkout
|
|
406
|
+
* (`./.github/workflows/<name>.yml`). For the repo that serves the reusables: its own callers then run the reusable at
|
|
407
|
+
* their own commit, so a PR that edits one exercises it. Composite actions are left on their full ref, because a
|
|
408
|
+
* reusable called from another repository cannot see this checkout.
|
|
409
|
+
*/
|
|
410
|
+
function localize(text, home = CI_HOME) {
|
|
411
|
+
const escaped = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
412
|
+
const reference = new RegExp(`${escaped(home.workflows)}/([\\w.-]+)@${escaped(home.ref)}`, "g");
|
|
413
|
+
return text.replace(reference, (_all, name) => `./.github/workflows/${name}`);
|
|
414
|
+
}
|
|
415
|
+
// src/generators/github-action-thin-callers/grouped-publish/yaml-scalar.ts
|
|
416
|
+
/**
|
|
417
|
+
* A value as a YAML scalar for a `with:` entry. Bare `[` and `{` would parse as
|
|
418
|
+
* sequence and mapping nodes, so values that start with one (JSON) are single-quoted
|
|
419
|
+
* and stay strings; a `'` inside is doubled, which is how YAML escapes it in single quotes.
|
|
420
|
+
*/
|
|
421
|
+
function yamlScalar(value) {
|
|
422
|
+
if (value === true) return "true";
|
|
423
|
+
if (value === false) return "false";
|
|
424
|
+
const text = String(value);
|
|
425
|
+
return text.startsWith("[") || text.startsWith("{") ? `'${text.replaceAll("'", "''")}'` : text;
|
|
426
|
+
}
|
|
427
|
+
// src/generators/github-action-thin-callers/workflow-title/workflow-title.ts
|
|
428
|
+
/** Words of a task id that are written in capitals, not title case. */
|
|
429
|
+
const ACRONYMS = {
|
|
430
|
+
ci: "CI",
|
|
431
|
+
dco: "DCO"
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* The title a task's runs carry in a run list: the id's words in title case (`deploy-sentinel` is `Deploy Sentinel`,
|
|
435
|
+
* `test:unit` is `Test Unit`, `ci` is `CI`). Only the run title uses it; the workflow, job and check names stay the id.
|
|
436
|
+
*/
|
|
437
|
+
function workflowTitle(id) {
|
|
438
|
+
return id.split(/[:-]/).filter(Boolean).map((word) => ACRONYMS[word] ?? word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
439
|
+
}
|
|
440
|
+
// src/generators/github-action-thin-callers/with-run-name/with-run-name.ts
|
|
441
|
+
/**
|
|
442
|
+
* Add a `run-name:` after the `name:` line of a thin caller, so a run is titled for what it did (`Deploy Sentinel
|
|
443
|
+
* (manual)`) and not with the task id. Only the events the caller has `triggers` for get a branch: a manual run says so,
|
|
444
|
+
* a scheduled one says so, a pull request run keeps the pull request title after the title, and any other event, a push
|
|
445
|
+
* included, is the title alone. A push run has no commit message in it: a squash commit's whole message, trailers
|
|
446
|
+
* included, would be the title, and an expression cannot cut it to its first line. The workflow `name:`, job names and
|
|
447
|
+
* so check names are not touched.
|
|
448
|
+
*/
|
|
449
|
+
function withRunName(yaml, id, triggers) {
|
|
450
|
+
if (/^run-name:/m.test(yaml)) return yaml;
|
|
451
|
+
const title = workflowTitle(id);
|
|
452
|
+
const branches = [];
|
|
453
|
+
if (triggers.includes("workflow_dispatch")) branches.push(`github.event_name == 'workflow_dispatch' && '${title} (manual)'`);
|
|
454
|
+
if (triggers.includes("schedule")) branches.push(`github.event_name == 'schedule' && '${title} (scheduled)'`);
|
|
455
|
+
if (triggers.some((t) => t === "pull_request" || t === "pull_request_target")) branches.push(`(github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && format('${title}: {0}', github.event.pull_request.title)`);
|
|
456
|
+
const value = branches.length === 0 ? title : `"\${{ ${[...branches, `'${title}'`].join(" || ")} }}"`;
|
|
457
|
+
return yaml.replace(/^(name: [^\n]*\n)/m, `$1\nrun-name: ${value}\n`);
|
|
458
|
+
}
|
|
459
|
+
// src/generators/aggregate-caller/aggregate-caller.ts
|
|
460
|
+
/**
|
|
461
|
+
* The thin caller of the `ci` aggregate: a `pull_request` workflow with one job, `ci`, that calls the reusable `ci.yml`
|
|
462
|
+
* with the ids to wait on. The job runs from the PR's own workflow file, so a PR that changes the ids is judged by them.
|
|
463
|
+
* It holds the permissions the reusable needs and nothing else; the reusable reads the Checks and status APIs only.
|
|
464
|
+
*/
|
|
465
|
+
function aggregateCaller({ expected, statuses }) {
|
|
466
|
+
return withRunName([
|
|
467
|
+
`name: ci`,
|
|
468
|
+
``,
|
|
469
|
+
`on: # yamllint disable-line rule:truthy`,
|
|
470
|
+
` pull_request:`,
|
|
471
|
+
``,
|
|
472
|
+
`concurrency:`,
|
|
473
|
+
` group: ci-\${{ github.ref }}`,
|
|
474
|
+
` cancel-in-progress: true`,
|
|
475
|
+
``,
|
|
476
|
+
`permissions:`,
|
|
477
|
+
` checks: read`,
|
|
478
|
+
` statuses: read`,
|
|
479
|
+
` contents: read`,
|
|
480
|
+
``,
|
|
481
|
+
`jobs:`,
|
|
482
|
+
` ci:`,
|
|
483
|
+
` name: ci`,
|
|
484
|
+
` uses: ${reusableWorkflowRef("ci.yml")}`,
|
|
485
|
+
` with:`,
|
|
486
|
+
` expected: ${yamlScalar(JSON.stringify(expected))}`,
|
|
487
|
+
` statuses: ${yamlScalar(JSON.stringify(statuses))}`,
|
|
488
|
+
``
|
|
489
|
+
].join("\n"), "ci", ["pull_request"]);
|
|
490
|
+
}
|
|
355
491
|
// src/vocabulary/suites/suites.ts
|
|
356
492
|
/**
|
|
357
493
|
* The suites the registry declares, in the order their first leaf appears: `test`, `lint`, `scan` and `validate`. A suite is declared by the `suite` field of its
|
|
@@ -402,7 +538,7 @@ var deploy_default$1 = "name: Deploy\n\non: # yamllint disable-line rule:truthy\
|
|
|
402
538
|
var doctor_tokens_default$1 = "name: Doctor Tokens\n\n# Runs `holocron doctor tokens` on a schedule (#2158, epic #2147): for each layer and each token a configured plugin\n# declares, it reads the layer's 1Password Environment in memory and runs the provider's `token` probe against the token\n# held there, so a token that gained a permission it must not have, lost one it needs, is past its rotation age or is near\n# its expiry fails this job. A failed run reaches #alerts through `platform.notifications.yml`; there is no other channel.\n#\n# Only what the runner can read is checked. The job reads Environments through a 1Password service account\n# (`HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN`); it reads the `ci` Environment and nothing else, never `prod`. A layer the\n# account cannot read (`local`, `dev`) is a `skip` row with the reason, never a failure, so the run proves what CI\n# itself can reach and says what it did not look at. `doctor tokens` has no flag to limit the layers: a layer the account\n# can read is checked, and its fail rules are unchanged. Without the secret every row is a skip and the run passes, which\n# the job notes with a warning.\n#\n# Daily, a little after `check-tokens`, so a token near its expiry stays in view until it is renewed. Values are never\n# printed: the probes scrub every token they use from their output.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `ci` layer Environment.\n required: false\n HOLOCRON_HEARTBEAT_DOCTOR_TOKENS:\n description: The ping URL of the `doctor-tokens` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n doctor-tokens:\n name: Run holocron doctor tokens\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n # The Axiom probe names the dataset it reads; the workflows read each organization variable as HOLOCRON_X || X.\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET || vars.AXIOM_DATASET }}\n steps:\n - name: Warn when no Environment can be read\n if: ${{ env.OP_SERVICE_ACCOUNT_TOKEN == '' }}\n run: echo \"::warning::HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN is not set, so no Environment can be read and every row is a skip.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run holocron doctor tokens\n with:\n task: doctor-tokens\n\n # Tells Checkly this run finished (#2359, the `doctor-tokens` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_DOCTOR_TOKENS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_DOCTOR_TOKENS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
403
539
|
var greet_default$1 = "name: Greetings\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n\njobs:\n greeting:\n name: Greet first-time contributors\n permissions:\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n # Group by the issue/PR number so duplicate events don't race each other.\n steps:\n - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0\n name: Greet on first contribution\n with:\n script: |\n // Only greet on the initial open — ignore synchronize, reopened, etc.\n if (context.payload.action !== 'opened') return;\n\n const actor = context.actor;\n const { owner, repo } = context.repo;\n\n // Payload inspection is more reliable than context.eventName for detecting\n // whether this is an issue vs. PR event — works regardless of how GitHub\n // propagates event names through workflow_call chains.\n const isIssue = !!context.payload.issue && !context.payload.pull_request;\n // listForRepo returns both issues and PRs (GitHub treats PRs as issues),\n // sorted newest-first. Filter by type to track first-issue and first-PR\n // independently, and avoid search-index eventual-consistency lag.\n const { data: recent } = await github.rest.issues.listForRepo({\n owner, repo,\n creator: actor,\n state: 'all',\n per_page: 100\n });\n\n const sameType = recent.filter(item =>\n isIssue ? !item.pull_request : !!item.pull_request\n );\n\n if (sameType.length !== 1) return;\n const body = isIssue\n ? `Hey @${actor}!\\n\\nWe really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we are a limited number of volunteers, so it is possible that this will not be addressed as swiftly.\\n\\nYour patience is much appreciated and we will get back to you as quickly as possible.`\n : `Hey @${actor}!\\n\\nWe really appreciate you taking the time to help out with this PR. The collaborators on this project attempt to help as many people as possible, but we are a limited number of volunteers, so it is possible that this will not be addressed as swiftly.\\n\\nYour patience is much appreciated and we will get back to you as quickly as possible.`;\n\n await github.rest.issues.createComment({\n owner,\n repo,\n issue_number: context.issue.number,\n body\n });\n";
|
|
404
540
|
var label_default$1 = "name: Bookkeeping\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n configuration-path:\n description: Path to the labeler configuration file in the calling repo\n type: string\n required: false\n default: .github/labeler.yml\n\njobs:\n label:\n name: Apply Labels\n permissions:\n contents: read\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n with:\n sparse-checkout: ${{ inputs.configuration-path || '.github/labeler.yml' }}\n sparse-checkout-cone-mode: false\n\n - uses: github/issue-labeler@ccca1e16fcb66762200e616fc29b57b940c1cb67 # v3.5\n if: ${{ github.event_name == 'pull_request' && hashFiles(inputs.configuration-path || '.github/labeler.yml') != '' }}\n # v3.4 bundles Node 20; allow it to run under Actions' current default.\n env:\n ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true\n with:\n # Fall back to default path when triggered directly (not via workflow_call)\n # because inputs.* defaults only apply on workflow_call events.\n configuration-path: ${{ inputs.configuration-path || '.github/labeler.yml' }}\n include-title: 1\n include-body: 0\n sync-labels: 1\n enable-versioned-regex: 0\n repo-token: ${{ github.token }}\n";
|
|
405
|
-
var code_default$1$1 = "name: Static Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n static-analysis:\n name: Run eslint, actionlint and prettier\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # actionlint has no npm distribution — install the prebuilt binary via\n # the maintainer's own documented download script.\n # NOTE: unverified against a live CI run at authoring time (D12) — flag\n # here if this needs adjustment.\n - name: Install actionlint\n run: |\n bash <(curl -sSf https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)\n sudo mv ./actionlint /usr/local/bin/actionlint\n\n - name: Check for merge-conflict markers\n # No package distributes this as a standalone tool — a plain grep for\n # the marker lines (the same check the old bundled linter ran, D12).\n run: |\n if grep -rlnE '^(<{7}|={7}|>{7})( |$)' \\\n --exclude-dir=.git --exclude-dir=node_modules .; then\n echo \"::error::merge-conflict markers found\"\n exit 1\n fi\n\n # Problem matchers turn the tools' own output into inline annotations on the pull request's diff (the job the\n # old `annotate` task did with ReviewDog, on a second checkout). They are files of this repo, so a copy of this\n # workflow that runs where they are missing skips them. `ci/matchers/eslint.json` reads stylish output, whose\n # paths are absolute, so turbo's `<package>:<task>:` prefix does not hide them.\n - name: Annotate eslint and actionlint findings\n run: |\n for matcher in eslint actionlint; do\n if [ -f \"ci/matchers/$matcher.json\" ]; then\n echo \"::add-matcher::ci/matchers/$matcher.json\"\n fi\n done\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run eslint and actionlint\n with:\n task: lint:code\n\n # `holocron run lint:code` runs turbo, which runs each package's eslint and nothing else, so actionlint (installed\n # above) is run here, on the repo's workflows. It ran in the old `annotate` job; `!cancelled()` runs it even when\n # eslint failed, so one run shows both.\n - name: Run actionlint\n if: ${{ !cancelled() }}\n run: actionlint\n\n # prettier's check is the `format` action, not a workflow\n # of its own. It is called by
|
|
541
|
+
var code_default$1$1 = "name: Static Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n static-analysis:\n name: Run eslint, actionlint and prettier\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # actionlint has no npm distribution — install the prebuilt binary via\n # the maintainer's own documented download script.\n # NOTE: unverified against a live CI run at authoring time (D12) — flag\n # here if this needs adjustment.\n - name: Install actionlint\n run: |\n bash <(curl -sSf https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)\n sudo mv ./actionlint /usr/local/bin/actionlint\n\n - name: Check for merge-conflict markers\n # No package distributes this as a standalone tool — a plain grep for\n # the marker lines (the same check the old bundled linter ran, D12).\n run: |\n if grep -rlnE '^(<{7}|={7}|>{7})( |$)' \\\n --exclude-dir=.git --exclude-dir=node_modules .; then\n echo \"::error::merge-conflict markers found\"\n exit 1\n fi\n\n # Problem matchers turn the tools' own output into inline annotations on the pull request's diff (the job the\n # old `annotate` task did with ReviewDog, on a second checkout). They are files of this repo, so a copy of this\n # workflow that runs where they are missing skips them. `ci/matchers/eslint.json` reads stylish output, whose\n # paths are absolute, so turbo's `<package>:<task>:` prefix does not hide them.\n - name: Annotate eslint and actionlint findings\n run: |\n for matcher in eslint actionlint; do\n if [ -f \"ci/matchers/$matcher.json\" ]; then\n echo \"::add-matcher::ci/matchers/$matcher.json\"\n fi\n done\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run eslint and actionlint\n with:\n task: lint:code\n\n # `holocron run lint:code` runs turbo, which runs each package's eslint and nothing else, so actionlint (installed\n # above) is run here, on the repo's workflows. It ran in the old `annotate` job; `!cancelled()` runs it even when\n # eslint failed, so one run shows both.\n - name: Run actionlint\n if: ${{ !cancelled() }}\n run: actionlint\n\n # prettier's check is the `format` action, not a workflow\n # of its own. It is called by the hosted reference, like the other actions; the repo that serves it runs its own\n # copy from the checkout (`./ci/actions/format`), see `hostedReusableWorkflows` in astromech.\n - uses: theholocron/.github/.github/actions/format@main\n name: Run prettier\n";
|
|
406
542
|
var commits_default$1 = "name: Commit Standards\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n commit-standards:\n name: Run commitlint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # No local equivalent (linters.ts: commitlint has no localBin — enforced\n # only at commit time via the commit-msg hook, and here in CI over the\n # PR's commit range). Not run through the holocron composite action.\n #\n # --config <resolved shared path> (config-resolution workstream, #676)\n # — falls back to commitlint's own auto-discovery of a local\n # commitlint.config.ts when the shared package's built dist/ isn't\n # present, same guard as the commit-msg hook.\n - name: Run commitlint over the PR range\n if: github.event_name == 'pull_request'\n run: |\n COMMITLINT_CONFIG=\"node_modules/@theholocron/commitlint-config/dist/index.js\"\n if [ -f \"$COMMITLINT_CONFIG\" ]; then\n pnpm exec commitlint --config \"$COMMITLINT_CONFIG\" --from \"${{ github.event.pull_request.base.sha }}\" --to \"${{ github.sha }}\"\n else\n pnpm exec commitlint --from \"${{ github.event.pull_request.base.sha }}\" --to \"${{ github.sha }}\"\n fi\n";
|
|
407
543
|
var data_default$1 = "name: Structured Data Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n structured-data-validation:\n name: Run yamllint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # yamllint has no npm distribution — Python ships preinstalled on\n # ubuntu-latest runners.\n - name: Install yamllint\n run: pip install --user yamllint\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run yamllint\n with:\n task: lint:data\n";
|
|
408
544
|
var editorconfig_default$2 = "name: lint:editorconfig\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n lint-editorconfig:\n name: Run editorconfig-checker\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # editorconfig-checker has no npm distribution — install the prebuilt\n # binary from its release tarball (v4.0.1+ ships the binary at the\n # tarball root as `editorconfig-checker`, not `bin/ec-<os>-<arch>` —\n # confirmed against a live CI run; the old asset name/path 404s now).\n - name: Install editorconfig-checker\n run: |\n curl -sSL https://github.com/editorconfig-checker/editorconfig-checker/releases/latest/download/editorconfig-checker-linux-amd64.tar.gz \\\n | tar xz -C /usr/local/bin editorconfig-checker\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run editorconfig-checker\n with:\n task: lint:editorconfig\n";
|
|
@@ -417,7 +553,7 @@ var preview_default$1 = "name: Preview\n\non: # yamllint disable-line rule:truth
|
|
|
417
553
|
var publish_wiki_default$1 = "name: Wiki\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n fern-version:\n description: >\n Fern CLI version to install. Pin this to avoid breaking changes when\n Fern updates their config schema.\n type: string\n required: false\n default: \"5.114.1\"\n preview:\n description: >\n When true, publishes a preview instead of production.\n Requires preview-id to be set.\n type: boolean\n required: false\n default: false\n preview-id:\n description: >\n Stable ID for the preview build. Use the PR number (e.g. \"pr-123\")\n so the same preview URL is reused on every push to the branch.\n type: string\n required: false\n default: \"\"\n fern-org:\n description: >\n DEPRECATED — the preview URL is now read from Fern's own output.\n Kept as a fallback for building the URL when that parse fails, and so\n existing callers do not error.\n type: string\n required: false\n default: \"\"\n base-path:\n description: >\n DEPRECATED — see fern-org. Basepath appended to the fallback preview\n URL (e.g. \"holocron\" for multi-source routing).\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_FERN_TOKEN:\n required: false\n FERN_TOKEN:\n required: false\n\njobs:\n publish:\n name: Publish to Fern\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n deployments: write\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - name: Install Fern CLI\n run: npm install -g \"fern-api@$FERN_VERSION\"\n env:\n FERN_VERSION: ${{ inputs.fern-version }}\n\n - name: Publish docs\n if: ${{ !inputs.preview }}\n run: fern generate --docs\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN || secrets.FERN_TOKEN }}\n\n - name: Preview docs\n id: preview\n if: ${{ inputs.preview && inputs.preview-id != '' }}\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN || secrets.FERN_TOKEN }}\n PREVIEW_ID: ${{ inputs.preview-id }}\n run: |\n out=$(fern generate --docs --preview --id \"$PREVIEW_ID\" 2>&1) || { printf '%s\\n' \"$out\"; exit 1; }\n printf '%s\\n' \"$out\"\n # Fern prints \"Published docs to https://<org>-preview-<id>.docs.buildwithfern.com/<path>\"\n url=$(printf '%s\\n' \"$out\" | grep -oiE 'https://[a-z0-9.-]+\\.docs\\.buildwithfern\\.com[^ )]*' | head -n1)\n echo \"url=$url\" >> \"$GITHUB_OUTPUT\"\n\n - name: Report preview URL\n if: ${{ inputs.preview && inputs.preview-id != '' }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n CAPTURED_URL: ${{ steps.preview.outputs.url }}\n FERN_ORG: ${{ inputs.fern-org }}\n PREVIEW_ID: ${{ inputs.preview-id }}\n BASE_PATH: ${{ inputs.base-path }}\n run: |\n PREVIEW_URL=\"$CAPTURED_URL\"\n if [ -z \"$PREVIEW_URL\" ] && [ -n \"$FERN_ORG\" ]; then\n PREVIEW_URL=\"https://${FERN_ORG}-preview-${PREVIEW_ID}.docs.buildwithfern.com${BASE_PATH:+/${BASE_PATH}}\"\n fi\n if [ -z \"$PREVIEW_URL\" ]; then\n echo \"::warning::no preview URL parsed from Fern output and no fern-org fallback — skipping the deployment widget\"\n exit 0\n fi\n PAYLOAD=$(printf '{\"ref\":\"%s\",\"environment\":\"wiki (Preview)\",\"description\":\"Wiki\",\"production_environment\":false,\"auto_merge\":false,\"required_contexts\":[]}' \\\n \"$GITHUB_HEAD_REF\")\n DEPLOY_ID=$(printf '%s\\n' \"$PAYLOAD\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n --method POST --input - | jq -r '.id')\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${DEPLOY_ID}/statuses\" \\\n --method POST --field state=success --field environment_url=\"$PREVIEW_URL\"\n";
|
|
418
554
|
var reconcile_ci_default$1 = "name: Reconcile ci\n\n# The safety net of the `ci` aggregate (spec `process-sentinel-posts-ci`, SPEC-0099): runs `holocron reconcile ci`, which\n# reads each open pull request's check runs and statuses and makes `ci / Required checks` say what they call for. A\n# healthy run writes nothing. A check that was missing or wrong for longer than ten minutes means a webhook was missed:\n# the run fails, and a failed run reaches #alerts through `platform.notifications.yml`.\n#\n# It posts as Sentinel's GitHub App, with an installation token narrowed to the three permissions it needs (checks:\n# write, pull_requests: read, statuses: read), never as `GITHUB_TOKEN`: a check run belongs to the app that posted it, and\n# the ruleset will be pinned to Sentinel's app. The App's id and private key reach the job as the secrets below (`secrets:\n# inherit` passes them from the caller). The App must hold Commit statuses: read, which a person grants.\n#\n# In a repo whose `ci.aggregate` is `actions` (the default) the command posts nothing and the run is green: the Actions job\n# is the poster there. Scheduled every 15 minutes by the caller; GitHub delays and drops scheduled runs, so the heartbeat\n# is more lenient than the cron.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_ID:\n description: The id of the GitHub App whose installation token posts the check.\n required: false\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of that GitHub App.\n required: false\n SENTINEL_APP_ID:\n description: The old name of SENTINEL_GITHUB_APP_ID, read when the new one is not set.\n required: false\n SENTINEL_APP_PRIVATE_KEY:\n description: The old name of SENTINEL_GITHUB_APP_PRIVATE_KEY, read when the new one is not set.\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_CI:\n description: The ping URL of the `reconcile-ci` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-ci:\n name: Bring the ci check up to date\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Two runs could post the same check twice, so a second waits for the first.\n concurrency:\n group: reconcile-ci\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY || secrets.SENTINEL_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n repositories: ${{ github.event.repository.name }}\n permission-checks: write\n permission-pull-requests: read\n permission-statuses: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # The token goes in the environment, never on the command line. The `source` provider reads it as its token.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Reconcile the ci check\n id: reconcile\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile ci --max-age 10\n\n - name: List what was done\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### ci reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # Tells Checkly this run finished (#2359, the `reconcile-ci` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_CI }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_CI is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
419
555
|
var reconcile_projects_default$1 = "name: Reconcile Projects\n\n# Keeps the project boards true to their rules (SPEC-0020, #1744): runs `holocron reconcile project`, which sets an item's\n# status from the issue's state and its \"blocked by\" links (an open blocker means blocked, no blocker left means planned,\n# a closed issue means done), then `holocron doctor project`, which reports what reconcile cannot fix.\n#\n# `GITHUB_TOKEN` cannot write an organization project, so the job mints an installation token from a GitHub App. The App\n# needs the organization permission Projects (read and write), which a person grants; its id and private key reach the job\n# as the secrets below (`secrets: inherit` passes them from the caller). The boards a repo keeps come from its own\n# `providers.projects` in holocron.config.ts, so a repo that declares none passes `doctor project` as a skip.\n#\n# Scheduled hourly by the caller. A failed run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_ID:\n description: The id of the GitHub App whose installation token writes the boards.\n required: false\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of that GitHub App.\n required: false\n SENTINEL_APP_ID:\n description: The old name of SENTINEL_GITHUB_APP_ID, read when the new one is not set.\n required: false\n SENTINEL_APP_PRIVATE_KEY:\n description: The old name of SENTINEL_GITHUB_APP_PRIVATE_KEY, read when the new one is not set.\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS:\n description: The ping URL of the `reconcile-projects` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-projects:\n name: Reconcile and check the boards\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n # Two runs could set the same item twice, so a second waits for the first.\n concurrency:\n group: reconcile-projects\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY || secrets.SENTINEL_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n permission-organization-projects: write\n permission-issues: read\n permission-pull-requests: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # The token goes in the environment, never on the command line.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Reconcile the boards\n id: reconcile\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile project\n\n - name: List what changed\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### Project reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # What reconcile cannot fix: a board that differs from its template, a rule that is off, a missing App permission.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Check the boards\n if: ${{ !cancelled() }}\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: doctor project\n\n # Tells Checkly this run finished (#2359, the `reconcile-projects` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
420
|
-
var release_default$1 = "name: Release\n\n# Semantic-release with OIDC Trusted Publishing.\n# actions/setup-node writes a default NODE_AUTH_TOKEN=${{ github.token }}\n# which shadows OIDC auth. We explicitly clear it so npm falls through to\n# the Trusted Publisher OIDC exchange.\n# The calling repo must have a .releaserc.json that configures branches,\n# plugins, and any publish options. npm@11+ is installed to support OIDC.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: >\n When true, runs semantic-release --dry-run: analyzes commits and\n previews the next release without git writes or publish. Only\n meaningful for workflow_dispatch triggers; push-triggered runs\n always run fully.\n type: boolean\n required: false\n default: false\n group:\n description: >\n Version group to release: a folder of the repo (`clients`,\n `observability`). Passed to the release config as RELEASE_GROUP, and\n scopes every tag lookup below to that group's `<group>-v*` tags, so\n releasing one group never reads another's. Empty releases the whole\n repo, with plain `v*` tags. Groups push release commits to the same\n branch, so release them one at a time (a matrix with `max-parallel: 1`);\n each run starts from the branch's current tip, not the commit that\n triggered the workflow.\n type: string\n required: false\n default: \"\"\n from-branch-tip:\n description: >\n When true, an ungrouped release starts from the branch's current tip\n instead of the commit that triggered the workflow. Set it when the\n repo-wide release runs after the version groups, whose release\n commits have moved the branch (semantic-release refuses to run\n behind its remote). A group always starts from the tip.\n type: boolean\n required: false\n default: false\n post-release:\n description: >\n When true, dispatches a readme sync broadcast after a successful\n release. Enable for packages consumed by other repos via the\n registry-doc system so downstream README installation blocks\n stay current.\n type: boolean\n required: false\n default: false\n run-build:\n description: Run `pnpm build` before releasing\n type: boolean\n required: false\n default: true\n deploy-on-release:\n description: >\n When true, runs a separate `deploy` job after a successful release\n (holocron#930): `holocron deploy on-release` deploys every workspace\n package whose `delivery.deploy` task is `with: { on: release }`, when\n the release is on its channel and changes its paths. The job is its\n own check, re-runnable on its own, and gets VERCEL_TOKEN; the release\n job never sees it. Off by default, so a repo that doesn't deploy from\n its release never exposes the token.\n type: boolean\n required: false\n default: false\n republish-tag:\n description: >\n Publish what npm lacks for an existing release instead of releasing\n (holocron#1387): the tag of the release, `<group>-v<version>` for a\n version group or `v<version>` for the rest. Set, the `release` job is\n skipped (no semantic-release, no tag, no release commit) and the\n `republish` job checks the tag out and runs `publish package\n --skip-already-published` for it. The tag must be on a release branch.\n The caller sets it from a manual run only. Empty is a normal release.\n type: string\n required: false\n default: \"\"\n exclude-groups:\n description: >\n Space-separated version groups that release on their own, left out of\n a republish of the repo-wide tag (`v<version>`). Ignored otherwise.\n type: string\n required: false\n default: \"\"\n sentry-project:\n description: >\n Sentry project slug for sourcemap upload and release creation after\n publishing. Omit to skip the Sentry release step entirely.\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_RELEASE_TOKEN:\n description: >\n Fine-grained PAT (Contents + Issues + Pull requests: write) owned by\n an admin. Required when the default branch is protected by a ruleset —\n github.token cannot push through rulesets, but an admin PAT can.\n Takes priority over HOLOCRON_SYNC_TOKEN. Falls back to github.token.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: >\n Legacy alias for HOLOCRON_RELEASE_TOKEN — kept for backward compatibility.\n Prefer HOLOCRON_RELEASE_TOKEN for new repos.\n required: false\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to github.token.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when\n HOLOCRON_READ_TOKEN is not set.\n required: false\n HOLOCRON_SENTRY_RELEASE_TOKEN:\n description: The Sentry release token (sourcemaps and release creation). Read first; the SENTRY_AUTH_TOKEN secret is the fallback.\n required: false\n SENTRY_AUTH_TOKEN:\n description: >\n Sentry auth token for sourcemap upload and release creation.\n Required when sentry-project is set. Use the org-level secret.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n description: >\n Vercel token for the deploy job. Only used when deploy-on-release is\n true, and only by that job.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: >\n The Holonet bot's token, for the announce job: it finds its earlier post and starts the thread. With\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES unset too, the release is not announced.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: The webhook of the `releases` channel, the announce job's post. Only used by that job.\n required: false\n\njobs:\n release:\n name: Semantic release\n if: ${{ inputs.republish-tag == '' }}\n permissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n outputs:\n # Read by the deploy job (holocron#930). Empty unless semantic-release\n # published: `commit` is the release commit, `previous` the commit of\n # the release before it (to diff against), `channel` the new version's\n # prerelease identifier (`alpha`), empty for a stable release (`main`).\n commit: ${{ steps.release.outputs.commit }}\n previous: ${{ steps.release.outputs.previous }}\n channel: ${{ steps.release.outputs.channel }}\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Do not cancel in-progress releases — a partial release is worse than a slow one.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n persist-credentials: false\n # A group's release commit moves the branch, so a later group's run must\n # release from the branch's current tip, not the commit that triggered the\n # workflow (semantic-release refuses to run behind its remote). Ungrouped,\n # the default (the triggering commit) is unchanged, unless `from-branch-tip`\n # says the groups ran first.\n ref: ${{ (inputs.group != '' || inputs.from-branch-tip) && github.ref || github.sha }}\n # Use HOLOCRON_RELEASE_TOKEN when available — git push (tags, release commits)\n # uses the checkout credential, not GITHUB_TOKEN env var. The\n # built-in github.token cannot push through branch protection rulesets.\n token: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n\n # semantic-release 26 needs Node 26.13 or later. The frozen setup action ignores `.node-version` (its expression\n # always falls through to this input, default 22.x), so the version is passed here.\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n with:\n node-version: \"26.x\"\n\n # By path: the action is new and `theholocron/.github` is frozen (see the `format` action in lint/code.yml).\n - uses: ./ci/actions/git-identity\n name: Configure git identity\n with:\n scope: global\n resolve: \"true\"\n signoff: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n # sigstore is required by libnpmpublish/provenance.js at module parse\n # time — before any config takes effect. Some npm 11.x builds stopped\n # bundling it; installing it globally into the same prefix ensures it\n # resolves regardless of npm version. (Discovered 2026-07-09.)\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n - name: Release\n id: release\n run: |\n BEFORE=$(git rev-parse HEAD)\n # A group's tags are `<group>-v<version>`; without one, the repo-wide `v<version>` tags only: a\n # `deployed/<package>` tag (the deploy step's marker) is nearer after a deploy and is not a release.\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n PREVIOUS_TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || true)\n PREVIOUS=\"\"\n if [ -n \"$PREVIOUS_TAG\" ]; then PREVIOUS=$(git rev-list -n 1 \"$PREVIOUS_TAG\"); fi\n if [ \"$DRY_RUN\" = \"true\" ]; then\n npx semantic-release --dry-run\n else\n npx semantic-release\n fi\n AFTER=$(git rev-parse HEAD)\n # semantic-release only commits (`chore(release): … [skip ci]`) when it\n # actually publishes. That commit gets no CI (and so no coverage\n # upload), which makes the next PR's `codecov/project` compare a full\n # report against a stale ancestor — a phantom drop (holocron#644).\n # Emit the new SHA so the steps below upload coverage for it.\n if [ \"$BEFORE\" != \"$AFTER\" ]; then\n echo \"commit=$AFTER\" >> \"$GITHUB_OUTPUT\"\n echo \"previous=$PREVIOUS\" >> \"$GITHUB_OUTPUT\"\n # The new version's channel: the prerelease identifier of its tag\n # (v5.0.0-alpha.108 or cli-v5.0.0-alpha.108 -> alpha), empty for a stable release.\n VERSION=$(git describe --tags --abbrev=0 \"${MATCH[@]}\")\n VERSION=${VERSION#\"$PREFIX\"}\n CHANNEL=\"\"\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n echo \"channel=$CHANNEL\" >> \"$GITHUB_OUTPUT\"\n fi\n env:\n DRY_RUN: ${{ inputs.dry-run }}\n # Read by the repo's release config to release one version group.\n RELEASE_GROUP: ${{ inputs.group }}\n # Prefer HOLOCRON_RELEASE_TOKEN (fine-grained PAT, Contents+Issues+PRs write,\n # owned by an admin with ruleset bypass) so @semantic-release/git can\n # push the version-bump commit through branch protection. Falls back to\n # HOLOCRON_SYNC_TOKEN (legacy) then github.token for unprotected repos.\n GITHUB_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n HUSKY: \"0\"\n NPM_CONFIG_PROVENANCE: true\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Coverage for the release commit\n if: ${{ steps.release.outputs.commit != '' }}\n with:\n task: test:unit\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload release-commit coverage to Codecov\n if: ${{ steps.release.outputs.commit != '' }}\n # fail_ci_if_error makes a failed upload fail this step, so it is visible, but\n # continue-on-error keeps it from failing the job: the release has already\n # published, and the Sentry release steps below must still run (holocron#934).\n continue-on-error: true\n with:\n use_oidc: true\n fail_ci_if_error: true\n override_commit: ${{ steps.release.outputs.commit }}\n override_branch: ${{ github.ref_name }}\n\n - name: Get release version\n id: release_version\n if: ${{ inputs.sentry-project != '' && inputs.dry-run != true }}\n env:\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || echo \"\")\n if [ -n \"$TAG\" ]; then\n echo \"release=${SENTRY_PROJECT}@${TAG#\"$PREFIX\"}\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - name: Create Sentry release\n if: ${{ inputs.sentry-project != '' && steps.release_version.outputs.release != '' && inputs.dry-run != true }}\n uses: getsentry/action-release@2e505a70ff06dac263413242aa3617fec90134e5 # v3\n env:\n SENTRY_AUTH_TOKEN: ${{ secrets.HOLOCRON_SENTRY_RELEASE_TOKEN || secrets.SENTRY_AUTH_TOKEN }}\n SENTRY_ORG: ${{ vars.HOLOCRON_SENTRY_ORG || vars.SENTRY_ORG }}\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n with:\n environment: production\n version: ${{ steps.release_version.outputs.release }}\n sourcemaps: \"**/dist\"\n\n republish:\n name: Republish\n # Publishes what npm lacks for a tag that already exists (holocron#1387). Never tags, never makes a release or a\n # release commit, never moves a branch: it reads the tag and publishes. It holds no write token for the repository.\n if: ${{ inputs.republish-tag != '' }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - name: Check the tag\n id: tag\n env:\n TAG: ${{ inputs.republish-tag }}\n RELEASE_GROUP: ${{ inputs.group }}\n EXCLUDED_GROUPS: ${{ inputs.exclude-groups }}\n DRY_RUN: ${{ inputs.dry-run }}\n run: |\n # A group's tags are `<group>-v<version>`; the rest of the repo's are `v<version>`.\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then PREFIX=\"${RELEASE_GROUP}-v\"; fi\n case \"$TAG\" in\n \"$PREFIX\"[0-9]*) ;;\n *) echo \"::error::$TAG is not a ${PREFIX}<version> tag\"; exit 1 ;;\n esac\n VERSION=${TAG#\"$PREFIX\"}\n # The channel is the prerelease identifier (5.0.0-alpha.9 -> alpha), `latest` for a stable version.\n CHANNEL=latest\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n ARGS=\"--skip-already-published --tag $CHANNEL\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n ARGS=\"$ARGS --group $RELEASE_GROUP\"\n else\n for g in $EXCLUDED_GROUPS; do ARGS=\"$ARGS --exclude-group $g\"; done\n fi\n # A manual run defaults to a dry run, so a republish is previewed before it publishes.\n if [ \"$DRY_RUN\" = \"true\" ]; then ARGS=\"$ARGS --dry-run\"; fi\n echo \"args=$ARGS\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the tag\n with:\n ref: refs/tags/${{ inputs.republish-tag }}\n fetch-depth: 0\n persist-credentials: false\n\n # Only a tag on a release branch is republished: a tag pushed to some other branch is not a release.\n - name: Require a release branch\n env:\n TAG: ${{ inputs.republish-tag }}\n run: |\n git fetch --no-tags origin '+refs/heads/main:refs/remotes/origin/main' '+refs/heads/alpha:refs/remotes/origin/alpha' || true\n for branch in main alpha; do\n if git rev-parse --verify --quiet \"refs/remotes/origin/$branch\" >/dev/null && git merge-base --is-ancestor HEAD \"refs/remotes/origin/$branch\"; then\n echo \"$TAG is on $branch\"\n exit 0\n fi\n done\n echo \"::error::$TAG is not on main or alpha, so it is not republished\"\n exit 1\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n # Writes the packages left unpublished to the job summary and fails when one is.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Publish what npm lacks\n env:\n NPM_CONFIG_PROVENANCE: true\n with:\n command: publish package\n args: ${{ steps.tag.outputs.args }}\n\n deploy:\n name: Deploy\n needs: release\n # Only after a release that actually published (`commit` is empty on a dry\n # run or when nothing was released). A failed deploy fails only this job:\n # the release is already on npm, and this job re-runs on its own.\n if: ${{ inputs.deploy-on-release == true && inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n # No credential is left in .git/config: the deploy script below runs with VERCEL_TOKEN and must not find a\n # write token. Only the record step at the end is given one (holocron#2330).\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Deploy packages that deploy on release\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n with:\n command: deploy on-release\n args: >-\n --channel=${{ needs.release.outputs.channel }}\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --record-file=${{ runner.temp }}/deployed.json\n\n # Records each package that deployed as a `deployed/<package>` tag, so a later release can make up a deploy this\n # one missed (holocron#2330). It runs even after a failed deploy (for the packages that did deploy), deploys\n # nothing, and is the only step that gets the job's token, in its own environment and never in .git/config.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Record the deploys\n if: ${{ !cancelled() }}\n env:\n GITHUB_TOKEN: ${{ github.token }}\n with:\n command: deploy on-release\n args: >-\n --record\n --record-file=${{ runner.temp }}/deployed.json\n\n announce:\n name: Announce release\n needs: release\n # Posts the release to #releases with a thread of its packages (holocron#2777, `holocron sync releases`). Only after\n # a release that actually published, never on a dry run. Like the deploy job, a failure fails only this job: the\n # release is already on npm. A repo without the two secrets gets a warning and no post.\n if: ${{ inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n # The `releases` channel's webhook (the layout's `webhook: true` stores it as this org secret); the Discord\n # provider reads HOLOCRON_DISCORD_WEBHOOK as its default webhook.\n HOLOCRON_DISCORD_WEBHOOK: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_RELEASES }}\n steps:\n - name: Warn that the release is not announced\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN == '' || env.HOLOCRON_DISCORD_WEBHOOK == '' }}\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN or HOLOCRON_NOTIFY_WEBHOOK_RELEASES is not set, so the release was not announced.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n\n # The release's tag, the way the release job names it: `<group>-v<version>` for a group, `v<version>` otherwise.\n - name: Find the release tag\n id: tag\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n env:\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=\"v[0-9]*\"\n if [ -n \"$RELEASE_GROUP\" ]; then MATCH=\"${RELEASE_GROUP}-v*\"; fi\n echo \"tag=$(git describe --tags --abbrev=0 --match \"$MATCH\" HEAD 2>/dev/null || true)\" >> \"$GITHUB_OUTPUT\"\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Announce the release\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n command: sync releases\n args: >-\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --tag=${{ steps.tag.outputs.tag }}\n --yes\n\n sync-readme:\n name: Post-release readme sync\n needs: release\n if: ${{ inputs.post-release == true && inputs.dry-run != true }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - name: Trigger broadcast readme sync\n run: |\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=readme\"\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n";
|
|
556
|
+
var release_default$1 = "name: Release\n\n# Semantic-release with OIDC Trusted Publishing.\n# actions/setup-node writes a default NODE_AUTH_TOKEN=${{ github.token }}\n# which shadows OIDC auth. We explicitly clear it so npm falls through to\n# the Trusted Publisher OIDC exchange.\n# The calling repo must have a .releaserc.json that configures branches,\n# plugins, and any publish options. npm@11+ is installed to support OIDC.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: >\n When true, runs semantic-release --dry-run: analyzes commits and\n previews the next release without git writes or publish. Only\n meaningful for workflow_dispatch triggers; push-triggered runs\n always run fully.\n type: boolean\n required: false\n default: false\n group:\n description: >\n Version group to release: a folder of the repo (`clients`,\n `observability`). Passed to the release config as RELEASE_GROUP, and\n scopes every tag lookup below to that group's `<group>-v*` tags, so\n releasing one group never reads another's. Empty releases the whole\n repo, with plain `v*` tags. Groups push release commits to the same\n branch, so release them one at a time (a matrix with `max-parallel: 1`);\n each run starts from the branch's current tip, not the commit that\n triggered the workflow.\n type: string\n required: false\n default: \"\"\n from-branch-tip:\n description: >\n When true, an ungrouped release starts from the branch's current tip\n instead of the commit that triggered the workflow. Set it when the\n repo-wide release runs after the version groups, whose release\n commits have moved the branch (semantic-release refuses to run\n behind its remote). A group always starts from the tip.\n type: boolean\n required: false\n default: false\n post-release:\n description: >\n When true, dispatches a readme sync broadcast after a successful\n release. Enable for packages consumed by other repos via the\n registry-doc system so downstream README installation blocks\n stay current.\n type: boolean\n required: false\n default: false\n run-build:\n description: Run `pnpm build` before releasing\n type: boolean\n required: false\n default: true\n deploy-on-release:\n description: >\n When true, runs a separate `deploy` job after a successful release\n (holocron#930): `holocron deploy on-release` deploys every workspace\n package whose `delivery.deploy` task is `with: { on: release }`, when\n the release is on its channel and changes its paths. The job is its\n own check, re-runnable on its own, and gets VERCEL_TOKEN; the release\n job never sees it. Off by default, so a repo that doesn't deploy from\n its release never exposes the token.\n type: boolean\n required: false\n default: false\n republish-tag:\n description: >\n Publish what npm lacks for an existing release instead of releasing\n (holocron#1387): the tag of the release, `<group>-v<version>` for a\n version group or `v<version>` for the rest. Set, the `release` job is\n skipped (no semantic-release, no tag, no release commit) and the\n `republish` job checks the tag out and runs `publish package\n --skip-already-published` for it. The tag must be on a release branch.\n The caller sets it from a manual run only. Empty is a normal release.\n type: string\n required: false\n default: \"\"\n exclude-groups:\n description: >\n Space-separated version groups that release on their own, left out of\n a republish of the repo-wide tag (`v<version>`). Ignored otherwise.\n type: string\n required: false\n default: \"\"\n sentry-project:\n description: >\n Sentry project slug for sourcemap upload and release creation after\n publishing. Omit to skip the Sentry release step entirely.\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_RELEASE_TOKEN:\n description: >\n Fine-grained PAT (Contents + Issues + Pull requests: write) owned by\n an admin. Required when the default branch is protected by a ruleset —\n github.token cannot push through rulesets, but an admin PAT can.\n Takes priority over HOLOCRON_SYNC_TOKEN. Falls back to github.token.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: >\n Legacy alias for HOLOCRON_RELEASE_TOKEN — kept for backward compatibility.\n Prefer HOLOCRON_RELEASE_TOKEN for new repos.\n required: false\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to github.token.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when\n HOLOCRON_READ_TOKEN is not set.\n required: false\n HOLOCRON_SENTRY_RELEASE_TOKEN:\n description: The Sentry release token (sourcemaps and release creation). Read first; the SENTRY_AUTH_TOKEN secret is the fallback.\n required: false\n SENTRY_AUTH_TOKEN:\n description: >\n Sentry auth token for sourcemap upload and release creation.\n Required when sentry-project is set. Use the org-level secret.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n description: >\n Vercel token for the deploy job. Only used when deploy-on-release is\n true, and only by that job.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: >\n The Holonet bot's token, for the announce job: it finds its earlier post and starts the thread. With\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES unset too, the release is not announced.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: The webhook of the `releases` channel, the announce job's post. Only used by that job.\n required: false\n\njobs:\n release:\n name: Semantic release\n if: ${{ inputs.republish-tag == '' }}\n permissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n outputs:\n # Read by the deploy job (holocron#930). Empty unless semantic-release\n # published: `commit` is the release commit, `previous` the commit of\n # the release before it (to diff against), `channel` the new version's\n # prerelease identifier (`alpha`), empty for a stable release (`main`).\n commit: ${{ steps.release.outputs.commit }}\n previous: ${{ steps.release.outputs.previous }}\n channel: ${{ steps.release.outputs.channel }}\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Do not cancel in-progress releases — a partial release is worse than a slow one.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n persist-credentials: false\n # A group's release commit moves the branch, so a later group's run must\n # release from the branch's current tip, not the commit that triggered the\n # workflow (semantic-release refuses to run behind its remote). Ungrouped,\n # the default (the triggering commit) is unchanged, unless `from-branch-tip`\n # says the groups ran first.\n ref: ${{ (inputs.group != '' || inputs.from-branch-tip) && github.ref || github.sha }}\n # Use HOLOCRON_RELEASE_TOKEN when available: the built-in github.token cannot push through\n # branch protection rulesets. The checkout keeps no credential (persist-credentials: false), so\n # semantic-release pushes its tags and release commits with GITHUB_TOKEN from the step's env, and\n # `publish tag` sends that same token with its own push of the major tag (ci-v1).\n token: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n\n # semantic-release 26 needs Node 26.13 or later. The frozen setup action ignores `.node-version` (its expression\n # always falls through to this input, default 22.x), so the version is passed here.\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n with:\n node-version: \"26.x\"\n\n # By path: the action is new and `theholocron/.github` is frozen (see the `format` action in lint/code.yml).\n - uses: ./ci/actions/git-identity\n name: Configure git identity\n with:\n scope: global\n resolve: \"true\"\n signoff: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n # sigstore is required by libnpmpublish/provenance.js at module parse\n # time — before any config takes effect. Some npm 11.x builds stopped\n # bundling it; installing it globally into the same prefix ensures it\n # resolves regardless of npm version. (Discovered 2026-07-09.)\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n - name: Release\n id: release\n run: |\n BEFORE=$(git rev-parse HEAD)\n # A group's tags are `<group>-v<version>`; without one, the repo-wide `v<version>` tags only: a\n # `deployed/<package>` tag (the deploy step's marker) is nearer after a deploy and is not a release.\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n PREVIOUS_TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || true)\n PREVIOUS=\"\"\n if [ -n \"$PREVIOUS_TAG\" ]; then PREVIOUS=$(git rev-list -n 1 \"$PREVIOUS_TAG\"); fi\n if [ \"$DRY_RUN\" = \"true\" ]; then\n npx semantic-release --dry-run\n else\n npx semantic-release\n fi\n AFTER=$(git rev-parse HEAD)\n # semantic-release only commits (`chore(release): … [skip ci]`) when it\n # actually publishes. That commit gets no CI (and so no coverage\n # upload), which makes the next PR's `codecov/project` compare a full\n # report against a stale ancestor — a phantom drop (holocron#644).\n # Emit the new SHA so the steps below upload coverage for it.\n if [ \"$BEFORE\" != \"$AFTER\" ]; then\n echo \"commit=$AFTER\" >> \"$GITHUB_OUTPUT\"\n echo \"previous=$PREVIOUS\" >> \"$GITHUB_OUTPUT\"\n # The new version's channel: the prerelease identifier of its tag\n # (v5.0.0-alpha.108 or cli-v5.0.0-alpha.108 -> alpha), empty for a stable release.\n VERSION=$(git describe --tags --abbrev=0 \"${MATCH[@]}\")\n VERSION=${VERSION#\"$PREFIX\"}\n CHANNEL=\"\"\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n echo \"channel=$CHANNEL\" >> \"$GITHUB_OUTPUT\"\n fi\n env:\n DRY_RUN: ${{ inputs.dry-run }}\n # Read by the repo's release config to release one version group.\n RELEASE_GROUP: ${{ inputs.group }}\n # Prefer HOLOCRON_RELEASE_TOKEN (fine-grained PAT, Contents+Issues+PRs write,\n # owned by an admin with ruleset bypass) so @semantic-release/git can\n # push the version-bump commit through branch protection. Falls back to\n # HOLOCRON_SYNC_TOKEN (legacy) then github.token for unprotected repos.\n GITHUB_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n HUSKY: \"0\"\n NPM_CONFIG_PROVENANCE: true\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Coverage for the release commit\n if: ${{ steps.release.outputs.commit != '' }}\n with:\n task: test:unit\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload release-commit coverage to Codecov\n if: ${{ steps.release.outputs.commit != '' }}\n # fail_ci_if_error makes a failed upload fail this step, so it is visible, but\n # continue-on-error keeps it from failing the job: the release has already\n # published, and the Sentry release steps below must still run (holocron#934).\n continue-on-error: true\n with:\n use_oidc: true\n fail_ci_if_error: true\n override_commit: ${{ steps.release.outputs.commit }}\n override_branch: ${{ github.ref_name }}\n\n - name: Get release version\n id: release_version\n if: ${{ inputs.sentry-project != '' && inputs.dry-run != true }}\n env:\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || echo \"\")\n if [ -n \"$TAG\" ]; then\n echo \"release=${SENTRY_PROJECT}@${TAG#\"$PREFIX\"}\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - name: Create Sentry release\n if: ${{ inputs.sentry-project != '' && steps.release_version.outputs.release != '' && inputs.dry-run != true }}\n uses: getsentry/action-release@2e505a70ff06dac263413242aa3617fec90134e5 # v3\n env:\n SENTRY_AUTH_TOKEN: ${{ secrets.HOLOCRON_SENTRY_RELEASE_TOKEN || secrets.SENTRY_AUTH_TOKEN }}\n SENTRY_ORG: ${{ vars.HOLOCRON_SENTRY_ORG || vars.SENTRY_ORG }}\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n with:\n environment: production\n version: ${{ steps.release_version.outputs.release }}\n sourcemaps: \"**/dist\"\n\n republish:\n name: Republish\n # Publishes what npm lacks for a tag that already exists (holocron#1387). Never tags, never makes a release or a\n # release commit, never moves a branch: it reads the tag and publishes. It holds no write token for the repository.\n if: ${{ inputs.republish-tag != '' }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - name: Check the tag\n id: tag\n env:\n TAG: ${{ inputs.republish-tag }}\n RELEASE_GROUP: ${{ inputs.group }}\n EXCLUDED_GROUPS: ${{ inputs.exclude-groups }}\n DRY_RUN: ${{ inputs.dry-run }}\n run: |\n # A group's tags are `<group>-v<version>`; the rest of the repo's are `v<version>`.\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then PREFIX=\"${RELEASE_GROUP}-v\"; fi\n case \"$TAG\" in\n \"$PREFIX\"[0-9]*) ;;\n *) echo \"::error::$TAG is not a ${PREFIX}<version> tag\"; exit 1 ;;\n esac\n VERSION=${TAG#\"$PREFIX\"}\n # The channel is the prerelease identifier (5.0.0-alpha.9 -> alpha), `latest` for a stable version.\n CHANNEL=latest\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n ARGS=\"--skip-already-published --tag $CHANNEL\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n ARGS=\"$ARGS --group $RELEASE_GROUP\"\n else\n for g in $EXCLUDED_GROUPS; do ARGS=\"$ARGS --exclude-group $g\"; done\n fi\n # A manual run defaults to a dry run, so a republish is previewed before it publishes.\n if [ \"$DRY_RUN\" = \"true\" ]; then ARGS=\"$ARGS --dry-run\"; fi\n echo \"args=$ARGS\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the tag\n with:\n ref: refs/tags/${{ inputs.republish-tag }}\n fetch-depth: 0\n persist-credentials: false\n\n # Only a tag on a release branch is republished: a tag pushed to some other branch is not a release.\n - name: Require a release branch\n env:\n TAG: ${{ inputs.republish-tag }}\n run: |\n git fetch --no-tags origin '+refs/heads/main:refs/remotes/origin/main' '+refs/heads/alpha:refs/remotes/origin/alpha' || true\n for branch in main alpha; do\n if git rev-parse --verify --quiet \"refs/remotes/origin/$branch\" >/dev/null && git merge-base --is-ancestor HEAD \"refs/remotes/origin/$branch\"; then\n echo \"$TAG is on $branch\"\n exit 0\n fi\n done\n echo \"::error::$TAG is not on main or alpha, so it is not republished\"\n exit 1\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n # Writes the packages left unpublished to the job summary and fails when one is.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Publish what npm lacks\n env:\n NPM_CONFIG_PROVENANCE: true\n with:\n command: publish package\n args: ${{ steps.tag.outputs.args }}\n\n deploy:\n name: Deploy\n needs: release\n # Only after a release that actually published (`commit` is empty on a dry\n # run or when nothing was released). A failed deploy fails only this job:\n # the release is already on npm, and this job re-runs on its own.\n if: ${{ inputs.deploy-on-release == true && inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n # No credential is left in .git/config: the deploy script below runs with VERCEL_TOKEN and must not find a\n # write token. Only the record step at the end is given one (holocron#2330).\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Deploy packages that deploy on release\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n with:\n command: deploy on-release\n args: >-\n --channel=${{ needs.release.outputs.channel }}\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --record-file=${{ runner.temp }}/deployed.json\n\n # Records each package that deployed as a `deployed/<package>` tag, so a later release can make up a deploy this\n # one missed (holocron#2330). It runs even after a failed deploy (for the packages that did deploy), deploys\n # nothing, and is the only step that gets the job's token, in its own environment and never in .git/config.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Record the deploys\n if: ${{ !cancelled() }}\n env:\n GITHUB_TOKEN: ${{ github.token }}\n with:\n command: deploy on-release\n args: >-\n --record\n --record-file=${{ runner.temp }}/deployed.json\n\n announce:\n name: Announce release\n needs: release\n # Posts the release to #releases with a thread of its packages (holocron#2777, `holocron sync releases`). Only after\n # a release that actually published, never on a dry run. Like the deploy job, a failure fails only this job: the\n # release is already on npm. A repo without the two secrets gets a warning and no post.\n if: ${{ inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n # The `releases` channel's webhook (the layout's `webhook: true` stores it as this org secret); the Discord\n # provider reads HOLOCRON_DISCORD_WEBHOOK as its default webhook.\n HOLOCRON_DISCORD_WEBHOOK: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_RELEASES }}\n steps:\n - name: Warn that the release is not announced\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN == '' || env.HOLOCRON_DISCORD_WEBHOOK == '' }}\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN or HOLOCRON_NOTIFY_WEBHOOK_RELEASES is not set, so the release was not announced.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n\n # The release's tag, the way the release job names it: `<group>-v<version>` for a group, `v<version>` otherwise.\n - name: Find the release tag\n id: tag\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n env:\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=\"v[0-9]*\"\n if [ -n \"$RELEASE_GROUP\" ]; then MATCH=\"${RELEASE_GROUP}-v*\"; fi\n echo \"tag=$(git describe --tags --abbrev=0 --match \"$MATCH\" HEAD 2>/dev/null || true)\" >> \"$GITHUB_OUTPUT\"\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Announce the release\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n command: sync releases\n args: >-\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --tag=${{ steps.tag.outputs.tag }}\n --yes\n\n sync-readme:\n name: Post-release readme sync\n needs: release\n if: ${{ inputs.post-release == true && inputs.dry-run != true }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - name: Trigger broadcast readme sync\n run: |\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=readme\"\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n";
|
|
421
557
|
var remind_doctor_default$1 = "name: Remind Doctor\n\n# A weekly nudge to run the drift check by hand (#1585). `holocron doctor notifications` compares the layout with the\n# live server and reads the Worker, the tracker and the secrets with provider tokens, which stay on a maintainer's\n# machine rather than in CI. This posts one line to #alerts, no ping, naming the command that checks and shares the\n# result. A missing webhook secret skips the post and never fails the run.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: The #alerts webhook the reminder posts to. Without it the post is skipped.\n required: false\n\njobs:\n remind-doctor:\n name: Remind to run the drift check\n permissions: {}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: \"Remind #alerts\"\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n message: \"🩺 ${{ github.repository }}: time for the weekly drift check. Run `holocron doctor notifications --built-only --post` to compare the server with the layout and post the result here.\"\n";
|
|
422
558
|
var code_default$2 = "name: Security\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n language:\n description: CodeQL language to analyze\n type: string\n required: false\n default: javascript-typescript\n\njobs:\n analyze:\n name: Analyze (${{ inputs.language }})\n permissions:\n actions: read\n contents: read\n security-events: write\n runs-on: ubuntu-latest\n timeout-minutes: 45\n # Do not cancel in-progress security scans.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Initialize CodeQL\n with:\n languages: ${{ inputs.language }}\n\n - uses: github/codeql-action/autobuild@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Autobuild\n\n - uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Analyze\n with:\n category: /language:${{ inputs.language }}\n";
|
|
423
559
|
var secrets_default$1 = "name: Secret Detection\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n secret-detection:\n name: Run gitleaks\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # gitleaks has no npm distribution. Install one pinned release and check\n # the tarball against the SHA-256 written here, not one fetched beside it.\n # The maintainer's install.sh is gone (404), and piping curl into sh hid\n # that: the step passed with no binary and the scan never ran (#2452).\n - name: Install gitleaks\n env:\n GITLEAKS_VERSION: 8.30.1\n GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb\n run: |\n archive=\"gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz\"\n curl -sSfL -o \"${RUNNER_TEMP}/${archive}\" \\\n \"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${archive}\"\n echo \"${GITLEAKS_SHA256} ${RUNNER_TEMP}/${archive}\" | sha256sum --check --strict\n tar -xzf \"${RUNNER_TEMP}/${archive}\" -C \"${RUNNER_TEMP}\" gitleaks\n install -m 0755 \"${RUNNER_TEMP}/gitleaks\" /usr/local/bin/gitleaks\n\n # `holocron run scan:secrets` passes when gitleaks is not on PATH, so\n # fail here if it is not.\n - name: Check gitleaks is installed\n run: gitleaks version\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run gitleaks\n with:\n task: scan:secrets\n\n # Advisory (#1573): betterleaks v2 is still a release candidate, so this job\n # never fails the run (each step has `continue-on-error`, so the job ends\n # green) and gitleaks above stays the required check. A finding or a failed\n # install shows as a warning. It runs only in a repo that has a\n # `betterleaks.toml`. When v2 is stable, bump the pin, drop `continue-on-error`\n # and retire the gitleaks job.\n betterleaks:\n name: Run betterleaks (advisory)\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # Betterleaks has no GitHub Action. Install one pinned release and check\n # the tarball against the SHA-256 written here, not one fetched beside it.\n - name: Install betterleaks\n id: install\n if: ${{ hashFiles('betterleaks.toml') != '' }}\n continue-on-error: true\n env:\n BETTERLEAKS_VERSION: 2.0.0-rc.9\n BETTERLEAKS_SHA256: 772a1a2e2d13a5bd80ef4bc900ad90942ac4383ac79fb6cdfcc7df542434f2f8\n run: |\n archive=\"betterleaks_${BETTERLEAKS_VERSION}_linux_x64.tar.gz\"\n curl -sSfL -o \"${RUNNER_TEMP}/${archive}\" \\\n \"https://github.com/betterleaks/betterleaks/releases/download/v${BETTERLEAKS_VERSION}/${archive}\"\n echo \"${BETTERLEAKS_SHA256} ${RUNNER_TEMP}/${archive}\" | sha256sum --check --strict\n tar -xzf \"${RUNNER_TEMP}/${archive}\" -C \"${RUNNER_TEMP}\" betterleaks\n install -m 0755 \"${RUNNER_TEMP}/betterleaks\" /usr/local/bin/betterleaks\n\n # Medium confidence and up: the low-confidence generic rules flag test\n # fixtures. Betterleaks reads `.betterleaksignore` (exact secret values\n # to skip) from the checkout itself.\n - name: Run betterleaks\n if: ${{ steps.install.outcome == 'success' }}\n continue-on-error: true\n run: |\n set -o pipefail\n if ! betterleaks git --no-banner --config betterleaks.toml --confidence=medium --redact .; then\n echo \"::warning title=betterleaks::Advisory scan found something or failed. Gitleaks is the required check; see the log.\"\n exit 1\n fi\n";
|
|
@@ -540,8 +676,8 @@ const ACTIONS = {
|
|
|
540
676
|
const BY_LEGACY_FILE = new Map(Object.entries(LEGACY_NAMES).flatMap(([legacy, targets]) => targets.slice(0, 1).map(({ id }) => [`${legacy}.yml`, workflowFile(id)])));
|
|
541
677
|
/**
|
|
542
678
|
* The flat file name of a reusable workflow given by its old one — `verification.unitTests.yml` is `test-unit.yml`.
|
|
543
|
-
* What a
|
|
544
|
-
*
|
|
679
|
+
* What a frozen copy in `theholocron/.github` is replaced by in `theholocron/holocron` (its deprecation notice names
|
|
680
|
+
* it). A file already flat, or with no old name, is returned as it is.
|
|
545
681
|
*/
|
|
546
682
|
function flatFile(file) {
|
|
547
683
|
return BY_LEGACY_FILE.get(file) ?? file;
|
|
@@ -556,432 +692,18 @@ const KNOWN_TASKS = /* @__PURE__ */ new Set([
|
|
|
556
692
|
...Object.keys(LEGACY_NAMES),
|
|
557
693
|
...Object.values(LEGACY_NAMES).flatMap((targets) => targets.map((target) => target.id))
|
|
558
694
|
]);
|
|
559
|
-
// src/vocabulary/legacy-callers/legacy-callers.ts
|
|
560
|
-
/**
|
|
561
|
-
* What each thin caller was called before the workflow, job and file names became the task id: the workflow `name:`,
|
|
562
|
-
* and the id and `name:` of each job by the id the job has now (the file basename, `workflowFile(id)` without `.yml`).
|
|
563
|
-
* A repo whose callers still point at the frozen reusables in `theholocron/.github` keeps these names, because its
|
|
564
|
-
* ruleset lists the checks they post (`<caller job name> / <called job name>`); see `legacyCaller`. Dropped with the
|
|
565
|
-
* gate when `CI_HOME` moves to `ci-v1`.
|
|
566
|
-
*/
|
|
567
|
-
const LEGACY_CALLERS = {
|
|
568
|
-
annotate: {
|
|
569
|
-
name: "Source Quality",
|
|
570
|
-
jobs: { annotate: {
|
|
571
|
-
id: "review",
|
|
572
|
-
name: "Annotations"
|
|
573
|
-
} }
|
|
574
|
-
},
|
|
575
|
-
build: {
|
|
576
|
-
name: "Delivery",
|
|
577
|
-
jobs: { build: {
|
|
578
|
-
id: "build",
|
|
579
|
-
name: "Build"
|
|
580
|
-
} }
|
|
581
|
-
},
|
|
582
|
-
"check-notify": {
|
|
583
|
-
name: "Platform",
|
|
584
|
-
jobs: { "check-notify": {
|
|
585
|
-
id: "notify-check",
|
|
586
|
-
name: "Notify Check"
|
|
587
|
-
} }
|
|
588
|
-
},
|
|
589
|
-
"check-preview": {
|
|
590
|
-
name: "Delivery",
|
|
591
|
-
jobs: { "check-preview": {
|
|
592
|
-
id: "preview-check",
|
|
593
|
-
name: "Preview Check"
|
|
594
|
-
} }
|
|
595
|
-
},
|
|
596
|
-
"check-tokens": {
|
|
597
|
-
name: "Token Expiry",
|
|
598
|
-
jobs: { "check-tokens": {
|
|
599
|
-
id: "token-expiry",
|
|
600
|
-
name: "Token Expiry"
|
|
601
|
-
} }
|
|
602
|
-
},
|
|
603
|
-
"doctor-tokens": {
|
|
604
|
-
name: "Doctor Tokens",
|
|
605
|
-
jobs: { "doctor-tokens": {
|
|
606
|
-
id: "doctor-tokens",
|
|
607
|
-
name: "Doctor Tokens"
|
|
608
|
-
} }
|
|
609
|
-
},
|
|
610
|
-
"deploy-preview": {
|
|
611
|
-
name: "Delivery",
|
|
612
|
-
jobs: { "deploy-preview": {
|
|
613
|
-
id: "preview-deploy",
|
|
614
|
-
name: "Preview Deploy"
|
|
615
|
-
} }
|
|
616
|
-
},
|
|
617
|
-
deploy: {
|
|
618
|
-
name: "Delivery",
|
|
619
|
-
combinedName: "Deploy",
|
|
620
|
-
jobs: {
|
|
621
|
-
deploy: {
|
|
622
|
-
id: "deploy",
|
|
623
|
-
name: "Deploy"
|
|
624
|
-
},
|
|
625
|
-
"deploy-preview": {
|
|
626
|
-
id: "preview",
|
|
627
|
-
name: "Preview"
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
greet: {
|
|
632
|
-
name: "Platform",
|
|
633
|
-
jobs: { greet: {
|
|
634
|
-
id: "greetings",
|
|
635
|
-
name: "Greetings"
|
|
636
|
-
} }
|
|
637
|
-
},
|
|
638
|
-
label: {
|
|
639
|
-
name: "Platform",
|
|
640
|
-
jobs: { label: {
|
|
641
|
-
id: "bookkeeping",
|
|
642
|
-
name: "Bookkeeping"
|
|
643
|
-
} }
|
|
644
|
-
},
|
|
645
|
-
"lint:code": {
|
|
646
|
-
name: "Source Quality",
|
|
647
|
-
jobs: { "lint-code": {
|
|
648
|
-
id: "static-analysis",
|
|
649
|
-
name: "Static Analysis"
|
|
650
|
-
} }
|
|
651
|
-
},
|
|
652
|
-
"lint:commits": {
|
|
653
|
-
name: "Platform",
|
|
654
|
-
jobs: { "lint-commits": {
|
|
655
|
-
id: "commit-standards",
|
|
656
|
-
name: "Commit Standards"
|
|
657
|
-
} }
|
|
658
|
-
},
|
|
659
|
-
"lint:data": {
|
|
660
|
-
name: "Source Quality",
|
|
661
|
-
jobs: { "lint-data": {
|
|
662
|
-
id: "structured-data-validation",
|
|
663
|
-
name: "Structured Data Validation"
|
|
664
|
-
} }
|
|
665
|
-
},
|
|
666
|
-
"lint:editorconfig": {
|
|
667
|
-
name: "Source Quality",
|
|
668
|
-
jobs: { "lint-editorconfig": {
|
|
669
|
-
id: "formatting",
|
|
670
|
-
name: "Formatting"
|
|
671
|
-
} }
|
|
672
|
-
},
|
|
673
|
-
"lint:markdown": {
|
|
674
|
-
name: "Source Quality",
|
|
675
|
-
jobs: { "lint-markdown": {
|
|
676
|
-
id: "formatting",
|
|
677
|
-
name: "Formatting"
|
|
678
|
-
} }
|
|
679
|
-
},
|
|
680
|
-
"lint:unused": {
|
|
681
|
-
name: "Source Quality",
|
|
682
|
-
jobs: { "lint-unused": {
|
|
683
|
-
id: "dead-code-analysis",
|
|
684
|
-
name: "Dead Code Analysis"
|
|
685
|
-
} }
|
|
686
|
-
},
|
|
687
|
-
"mark-stale": {
|
|
688
|
-
name: "Stale",
|
|
689
|
-
jobs: { "mark-stale": { id: "stale" } }
|
|
690
|
-
},
|
|
691
|
-
"measure:bundle": {
|
|
692
|
-
name: "Delivery",
|
|
693
|
-
jobs: { "measure-bundle": {
|
|
694
|
-
id: "bundle-size",
|
|
695
|
-
name: "Audit the Bundle Size"
|
|
696
|
-
} }
|
|
697
|
-
},
|
|
698
|
-
preview: {
|
|
699
|
-
name: "Preview",
|
|
700
|
-
jobs: { preview: {
|
|
701
|
-
id: "preview",
|
|
702
|
-
name: "Preview"
|
|
703
|
-
} }
|
|
704
|
-
},
|
|
705
|
-
"measure:docs": {
|
|
706
|
-
name: "Source Quality",
|
|
707
|
-
jobs: { "measure-docs": {
|
|
708
|
-
id: "docs-coverage",
|
|
709
|
-
name: "Docs coverage"
|
|
710
|
-
} }
|
|
711
|
-
},
|
|
712
|
-
"publish-wiki": {
|
|
713
|
-
name: "Knowledge",
|
|
714
|
-
jobs: {
|
|
715
|
-
"publish-wiki": {
|
|
716
|
-
id: "publish",
|
|
717
|
-
name: "Publish"
|
|
718
|
-
},
|
|
719
|
-
"publish-wiki-preview": {
|
|
720
|
-
id: "preview",
|
|
721
|
-
name: "Preview"
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
},
|
|
725
|
-
"remind-doctor": {
|
|
726
|
-
name: "Platform",
|
|
727
|
-
jobs: { "remind-doctor": {
|
|
728
|
-
id: "doctor-reminder",
|
|
729
|
-
name: "Doctor reminder"
|
|
730
|
-
} }
|
|
731
|
-
},
|
|
732
|
-
"reconcile-ci": {
|
|
733
|
-
name: "Reconcile ci",
|
|
734
|
-
jobs: { "reconcile-ci": {
|
|
735
|
-
id: "reconcile-ci",
|
|
736
|
-
name: "Reconcile ci"
|
|
737
|
-
} }
|
|
738
|
-
},
|
|
739
|
-
"reconcile-projects": {
|
|
740
|
-
name: "Platform",
|
|
741
|
-
jobs: { "reconcile-projects": {
|
|
742
|
-
id: "reconcile-projects",
|
|
743
|
-
name: "Reconcile Projects"
|
|
744
|
-
} }
|
|
745
|
-
},
|
|
746
|
-
release: {
|
|
747
|
-
name: "Delivery",
|
|
748
|
-
jobs: { release: {
|
|
749
|
-
id: "release",
|
|
750
|
-
name: "Release"
|
|
751
|
-
} },
|
|
752
|
-
replace: { "name: release ${{ matrix.group }}": "name: Release ${{ matrix.group }}" }
|
|
753
|
-
},
|
|
754
|
-
"scan:code": {
|
|
755
|
-
name: "Security",
|
|
756
|
-
jobs: { "scan-code": {
|
|
757
|
-
id: "security",
|
|
758
|
-
name: "Code Scanning"
|
|
759
|
-
} }
|
|
760
|
-
},
|
|
761
|
-
"scan:secrets": {
|
|
762
|
-
name: "Security",
|
|
763
|
-
jobs: { "scan-secrets": {
|
|
764
|
-
id: "secret-detection",
|
|
765
|
-
name: "Secret Detection"
|
|
766
|
-
} }
|
|
767
|
-
},
|
|
768
|
-
"sync-repo": {
|
|
769
|
-
name: "Platform",
|
|
770
|
-
jobs: { "sync-repo": {
|
|
771
|
-
id: "sync",
|
|
772
|
-
name: "Sync"
|
|
773
|
-
} }
|
|
774
|
-
},
|
|
775
|
-
"deploy-sentinel": {
|
|
776
|
-
name: "Sentinel Deploy",
|
|
777
|
-
jobs: { "deploy-sentinel": {
|
|
778
|
-
id: "deploy",
|
|
779
|
-
name: "Deploy"
|
|
780
|
-
} }
|
|
781
|
-
},
|
|
782
|
-
"sync-secrets": {
|
|
783
|
-
name: "Sentinel Secrets Sync",
|
|
784
|
-
jobs: { "sync-secrets": {
|
|
785
|
-
id: "sync",
|
|
786
|
-
name: "Sync"
|
|
787
|
-
} }
|
|
788
|
-
},
|
|
789
|
-
"sync-issues": {
|
|
790
|
-
name: "Sync Issues",
|
|
791
|
-
jobs: { "sync-issues": {
|
|
792
|
-
id: "sync-issues",
|
|
793
|
-
name: "Sync Issues"
|
|
794
|
-
} }
|
|
795
|
-
},
|
|
796
|
-
"sync-incidents": {
|
|
797
|
-
name: "Sync incidents",
|
|
798
|
-
jobs: { "sync-incidents": {
|
|
799
|
-
id: "sync-incidents",
|
|
800
|
-
name: "Sync incidents"
|
|
801
|
-
} }
|
|
802
|
-
},
|
|
803
|
-
"sync-prs": {
|
|
804
|
-
name: "Sync PRs",
|
|
805
|
-
jobs: { "sync-prs": {
|
|
806
|
-
id: "sync-prs",
|
|
807
|
-
name: "Sync PRs"
|
|
808
|
-
} }
|
|
809
|
-
},
|
|
810
|
-
"open-incident": {
|
|
811
|
-
name: "Open incident",
|
|
812
|
-
jobs: { "open-incident": {
|
|
813
|
-
id: "open-incident",
|
|
814
|
-
name: "Open incident"
|
|
815
|
-
} }
|
|
816
|
-
},
|
|
817
|
-
"sync-specs": {
|
|
818
|
-
name: "Spec discussions",
|
|
819
|
-
jobs: { "sync-specs": {
|
|
820
|
-
id: "sync",
|
|
821
|
-
name: "Sync"
|
|
822
|
-
} }
|
|
823
|
-
},
|
|
824
|
-
"preview-specs": {
|
|
825
|
-
name: "Spec discussions (pull request)",
|
|
826
|
-
jobs: { "preview-specs": {
|
|
827
|
-
id: "sync",
|
|
828
|
-
name: "Sync"
|
|
829
|
-
} }
|
|
830
|
-
},
|
|
831
|
-
"sync-templates": {
|
|
832
|
-
name: "Platform",
|
|
833
|
-
jobs: { "sync-templates": {
|
|
834
|
-
id: "sync-templates",
|
|
835
|
-
name: "Sync Templates"
|
|
836
|
-
} }
|
|
837
|
-
},
|
|
838
|
-
"test:perf": {
|
|
839
|
-
name: "Verification",
|
|
840
|
-
jobs: { "test-perf": {
|
|
841
|
-
id: "performance",
|
|
842
|
-
name: "Audit the Performance"
|
|
843
|
-
} }
|
|
844
|
-
},
|
|
845
|
-
"test:unit": {
|
|
846
|
-
name: "Verification",
|
|
847
|
-
jobs: { "test-unit": {
|
|
848
|
-
id: "test",
|
|
849
|
-
name: "Test"
|
|
850
|
-
} }
|
|
851
|
-
},
|
|
852
|
-
"test:visual": {
|
|
853
|
-
name: "Visual Regression",
|
|
854
|
-
jobs: { "test-visual": {
|
|
855
|
-
id: "visual-and-composition",
|
|
856
|
-
name: "Visual Regression"
|
|
857
|
-
} }
|
|
858
|
-
},
|
|
859
|
-
typecheck: {
|
|
860
|
-
name: "Verification",
|
|
861
|
-
jobs: { typecheck: {
|
|
862
|
-
id: "typecheck",
|
|
863
|
-
name: "Typecheck"
|
|
864
|
-
} }
|
|
865
|
-
},
|
|
866
|
-
"update-deps": {
|
|
867
|
-
name: "Platform",
|
|
868
|
-
jobs: { "update-deps": {
|
|
869
|
-
id: "dependencies",
|
|
870
|
-
name: "Dependencies"
|
|
871
|
-
} }
|
|
872
|
-
},
|
|
873
|
-
"validate:specs": {
|
|
874
|
-
name: "Platform",
|
|
875
|
-
jobs: { "validate-specs": {
|
|
876
|
-
id: "repo-validation",
|
|
877
|
-
name: "Repo Validation"
|
|
878
|
-
} }
|
|
879
|
-
},
|
|
880
|
-
"validate:docs": {
|
|
881
|
-
name: "Platform",
|
|
882
|
-
jobs: { "validate-docs": {
|
|
883
|
-
id: "repo-validation",
|
|
884
|
-
name: "Repo Validation"
|
|
885
|
-
} }
|
|
886
|
-
},
|
|
887
|
-
"validate:deps": {
|
|
888
|
-
name: "Source Quality",
|
|
889
|
-
jobs: { "validate-deps": {
|
|
890
|
-
id: "dependency-catalogs",
|
|
891
|
-
name: "Dependency catalogs"
|
|
892
|
-
} }
|
|
893
|
-
},
|
|
894
|
-
"validate:generated": {
|
|
895
|
-
name: "Source Quality",
|
|
896
|
-
jobs: { "validate-generated": {
|
|
897
|
-
id: "generated-files",
|
|
898
|
-
name: "Generated files"
|
|
899
|
-
} }
|
|
900
|
-
},
|
|
901
|
-
"deploy-docs": {
|
|
902
|
-
name: "Deploy",
|
|
903
|
-
jobs: {
|
|
904
|
-
"deploy-docs": {
|
|
905
|
-
id: "deploy",
|
|
906
|
-
name: "Deploy"
|
|
907
|
-
},
|
|
908
|
-
"deploy-docs-preview": {
|
|
909
|
-
id: "preview",
|
|
910
|
-
name: "Preview"
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
},
|
|
914
|
-
"deploy-components": {
|
|
915
|
-
name: "Deploy",
|
|
916
|
-
jobs: {
|
|
917
|
-
"deploy-components": {
|
|
918
|
-
id: "deploy",
|
|
919
|
-
name: "Deploy"
|
|
920
|
-
},
|
|
921
|
-
"deploy-components-preview": {
|
|
922
|
-
id: "preview",
|
|
923
|
-
name: "Preview"
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
// src/vocabulary/legacy-caller/legacy-caller.ts
|
|
929
|
-
const escaped = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
930
|
-
/**
|
|
931
|
-
* The thin caller `yaml` of task `id` spelled with the names it had before they became the task id: the old workflow
|
|
932
|
-
* `name:` and the old id and `name:` of each job. This is the legacy-name gate (spec `ci-flat-task-vocabulary`, phase
|
|
933
|
-
* F): a repo whose callers still call the frozen reusables in `theholocron/.github` keeps the checks its ruleset lists,
|
|
934
|
-
* so only the repo that hosts the reusables (and, later, every repo once `CI_HOME` is `ci-v1`) gets the flat names.
|
|
935
|
-
* An id with no old spelling is returned as it is. Only a job `name:` that is the id is rewritten, so a name a caller
|
|
936
|
-
* builds itself (the grouped release's matrix name) is left to the entry's `replace`.
|
|
937
|
-
*/
|
|
938
|
-
function legacyCaller(id, yaml) {
|
|
939
|
-
const legacy = LEGACY_CALLERS[id];
|
|
940
|
-
if (legacy === void 0) return yaml;
|
|
941
|
-
const combined = legacy.combinedName !== void 0 && /^ {2}[\w-]+-preview:\s*$/m.test(yaml);
|
|
942
|
-
let out = yaml.replace(/^name:.*$/m, `name: ${combined ? legacy.combinedName : legacy.name}`);
|
|
943
|
-
for (const [from, to] of Object.entries(legacy.replace ?? {})) out = out.replaceAll(from, to);
|
|
944
|
-
const flatName = new RegExp(`^ {4}name: ${escaped(id)}[^\\S\\n]*\\n`, "m");
|
|
945
|
-
for (const [flat, job] of Object.entries(legacy.jobs)) {
|
|
946
|
-
const block = new RegExp(`^ {2}${escaped(flat)}:[^\\S\\n]*\\n((?: {4}[^\\n]*\\n|\\n)*)`, "m");
|
|
947
|
-
out = out.replace(block, (_all, rest) => {
|
|
948
|
-
const body = rest.replace(flatName, job.name === void 0 ? "" : ` name: ${job.name}\n`);
|
|
949
|
-
return ` ${job.id}:\n${body}`;
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
|
-
return out;
|
|
953
|
-
}
|
|
954
|
-
// src/vocabulary/legacy-caller-file/legacy-caller-file.ts
|
|
955
|
-
/**
|
|
956
|
-
* The file name a thin caller of task `id` has while callers are legacy-named (see `legacyCaller`): the old task name
|
|
957
|
-
* and `.yml`, `verification.unitTests.yml` for `test:unit`. An id with no old name (`preview`) keeps its own.
|
|
958
|
-
*/
|
|
959
|
-
function legacyCallerFile(id) {
|
|
960
|
-
return `${legacyName(id) ?? id}.yml`;
|
|
961
|
-
}
|
|
962
695
|
// src/vocabulary/legacy-file/legacy-file.ts
|
|
963
696
|
/** Each flat reusable file name and the old file name it replaced: the file of the first successor of an old name. */
|
|
964
697
|
const BY_FLAT_FILE = new Map(Object.entries(LEGACY_NAMES).flatMap(([legacy, targets]) => targets.slice(0, 1).map(({ id }) => [workflowFile(id), `${legacy}.yml`])));
|
|
965
698
|
/**
|
|
966
699
|
* The old file name of a flat reusable workflow — `test-unit.yml` is `verification.unitTests.yml`. The frozen copies in
|
|
967
|
-
* `theholocron/.github` keep the old names and exist only there, so
|
|
968
|
-
*
|
|
969
|
-
*
|
|
700
|
+
* `theholocron/.github` keep the old names and exist only there, so the path of a frozen copy, and of a workflow that
|
|
701
|
+
* is still dispatched there by name, is spelled with it (spec `ci-flat-task-vocabulary`). A file with no old name
|
|
702
|
+
* (`preview.yml`, `ci.yml`) is returned as it is.
|
|
970
703
|
*/
|
|
971
704
|
function legacyFile(file) {
|
|
972
705
|
return BY_FLAT_FILE.get(file) ?? file;
|
|
973
706
|
}
|
|
974
|
-
// src/vocabulary/legacy-workflow-key/legacy-workflow-key.ts
|
|
975
|
-
/**
|
|
976
|
-
* The key of the workflow that carries `name` in a repo that still calls the frozen reusables in `theholocron/.github`
|
|
977
|
-
* (the legacy-name gate): a flat id that shared an old workflow with others (`lint:markdown` and `format` with
|
|
978
|
-
* `lint:editorconfig`, the old `sourceQuality.formatting`) maps to the first of them, because only that one has a
|
|
979
|
-
* frozen reusable. Every other name is its own key, an old name mapping to its first successor.
|
|
980
|
-
*/
|
|
981
|
-
function legacyWorkflowKey(name) {
|
|
982
|
-
const legacy = LEGACY_NAMES[name] ? name : legacyName(name);
|
|
983
|
-
return legacy === void 0 ? name : LEGACY_NAMES[legacy][0].id;
|
|
984
|
-
}
|
|
985
707
|
// src/vocabulary/reserved-script-names/reserved-script-names.ts
|
|
986
708
|
/**
|
|
987
709
|
* Script names npm and pnpm give a meaning of their own, so no task may be named like one (spec
|
|
@@ -1089,7 +811,7 @@ function taskKey(name, id) {
|
|
|
1089
811
|
* the workflow that carries it. A flat id is its own key; an old name maps to the first id that replaced it
|
|
1090
812
|
* (`sourceQuality.formatting` is `lint:editorconfig`); a task with no workflow of its own maps to the workflow that
|
|
1091
813
|
* runs its check (`format` is `lint:code`, see `TaskDef.host`); a name with no old name (`preview`, an unknown one) is
|
|
1092
|
-
* its own key.
|
|
814
|
+
* its own key.
|
|
1093
815
|
*/
|
|
1094
816
|
function workflowKey(name) {
|
|
1095
817
|
return LEGACY_NAMES[name]?.[0]?.id ?? TASKS[name]?.host ?? name;
|
|
@@ -1107,167 +829,6 @@ function workflowKeys(name) {
|
|
|
1107
829
|
const keys = [...new Set(ids.map(({ id }) => workflowKey(id)))];
|
|
1108
830
|
return keys.length > 0 ? keys : [workflowKey(name)];
|
|
1109
831
|
}
|
|
1110
|
-
// src/generators/ci-ref/ci-ref.ts
|
|
1111
|
-
/**
|
|
1112
|
-
* The org slug a CLI user gets when no config names one. Where a resolved config is in reach, `config.org` is the
|
|
1113
|
-
* source and this is only the fallback; a command with no config (`new repo`, `sync github`, `publish --sync-trust`)
|
|
1114
|
-
* uses it as it is.
|
|
1115
|
-
*/
|
|
1116
|
-
const DEFAULT_ORG = "theholocron";
|
|
1117
|
-
/** The `owner/repo` of the org's `.github` repo, which hosts the frozen reusable workflows (and Sentinel's dispatch target). */
|
|
1118
|
-
const DOT_GITHUB_REPO = `${DEFAULT_ORG}/.github`;
|
|
1119
|
-
/** The `owner/repo` of this monorepo, where the CLI, the reusables' sources and the Trusted Publisher config live. */
|
|
1120
|
-
const HOLOCRON_REPO = `${DEFAULT_ORG}/holocron`;
|
|
1121
|
-
/** How the templates spell a reference. Never emitted as it is, and never to be changed: {@link rehome} reads it. */
|
|
1122
|
-
const TEMPLATE_HOME = {
|
|
1123
|
-
workflows: `${DOT_GITHUB_REPO}/.github/workflows`,
|
|
1124
|
-
actions: `${DOT_GITHUB_REPO}/.github/actions`,
|
|
1125
|
-
ref: "main"
|
|
1126
|
-
};
|
|
1127
|
-
/**
|
|
1128
|
-
* Where generated workflows call the hosted files today. No change from the templates' own spelling until the files
|
|
1129
|
-
* move (#1475, #1480); the target is `theholocron/holocron/.github/workflows` and `theholocron/holocron/ci/actions` at
|
|
1130
|
-
* `ci-v1`.
|
|
1131
|
-
*/
|
|
1132
|
-
const CI_HOME = { ...TEMPLATE_HOME };
|
|
1133
|
-
/**
|
|
1134
|
-
* Where the hosted files will live once `ci-v1` exists, and where a frozen copy in `theholocron/.github` tells its
|
|
1135
|
-
* users to go. Not used to generate anything yet: {@link CI_HOME} follows when the tag does.
|
|
1136
|
-
*/
|
|
1137
|
-
const CI_TARGET = {
|
|
1138
|
-
workflows: `${HOLOCRON_REPO}/.github/workflows`,
|
|
1139
|
-
actions: `${HOLOCRON_REPO}/ci/actions`,
|
|
1140
|
-
ref: "ci-v1"
|
|
1141
|
-
};
|
|
1142
|
-
/**
|
|
1143
|
-
* The file name a reference to the reusable `file` (flat, as the templates spell it) has at `home`. The frozen copies
|
|
1144
|
-
* that `main` of `theholocron/.github` serves have the old names, so a `main` home gets the old name; `ci-v1` has only
|
|
1145
|
-
* flat ones.
|
|
1146
|
-
*/
|
|
1147
|
-
function fileAt(file, home) {
|
|
1148
|
-
return legacyGate(home) ? legacyFile(file) : file;
|
|
1149
|
-
}
|
|
1150
|
-
/**
|
|
1151
|
-
* Whether a caller that calls its reusables at `home` keeps the names it had before they became the task id (the
|
|
1152
|
-
* legacy-name gate): while 'home' is the frozen copies on `main`, the callers of a repo other than the one that hosts
|
|
1153
|
-
* the reusables keep their old workflow, job and file names, because their rulesets list the checks those post. `ci-v1`
|
|
1154
|
-
* has only flat names, so the gate is open there and every caller is flat (spec `ci-flat-task-vocabulary`, phase K).
|
|
1155
|
-
*/
|
|
1156
|
-
function legacyGate(home = CI_HOME) {
|
|
1157
|
-
return home.ref === "main";
|
|
1158
|
-
}
|
|
1159
|
-
const REFERENCE = /theholocron\/\.github\/\.github\/(workflows|actions)\/([\w.-]+)@main/g;
|
|
1160
|
-
/** `text` with every hosted-workflow and hosted-action reference moved from the templates' spelling to `home`. */
|
|
1161
|
-
function rehome(text, home = CI_HOME) {
|
|
1162
|
-
return text.replace(REFERENCE, (_all, kind, name) => `${home[kind]}/${kind === "workflows" ? fileAt(name, home) : name}@${home.ref}`);
|
|
1163
|
-
}
|
|
1164
|
-
/** {@link rehome} applied to every value of a map of templates. */
|
|
1165
|
-
function rehomeAll(templates, home = CI_HOME) {
|
|
1166
|
-
return Object.fromEntries(Object.entries(templates).map(([name, text]) => [name, rehome(text, home)]));
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* A `uses:` value for a hosted reusable workflow, for generated YAML that is not written in a template. `file` is the
|
|
1170
|
-
* flat name (`deploy.yml`); at a `main` home it is spelled with the old one.
|
|
1171
|
-
*/
|
|
1172
|
-
function reusableWorkflowRef(file, home = CI_HOME) {
|
|
1173
|
-
return `${home.workflows}/${fileAt(file, home)}@${home.ref}`;
|
|
1174
|
-
}
|
|
1175
|
-
/**
|
|
1176
|
-
* `text` with every reference to a hosted reusable workflow at `home` rewritten to the file in the same checkout
|
|
1177
|
-
* (`./.github/workflows/<name>.yml`, always the flat name, whichever spelling the reference had). For the repo that hosts the reusables: its own callers then run the reusable at
|
|
1178
|
-
* their own commit, so a PR that edits one exercises it. Composite actions are left on their full ref, because a
|
|
1179
|
-
* reusable called from another repository cannot see this checkout.
|
|
1180
|
-
*/
|
|
1181
|
-
function localize(text, home = CI_HOME) {
|
|
1182
|
-
const escaped = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1183
|
-
const reference = new RegExp(`${escaped(home.workflows)}/([\\w.-]+)@${escaped(home.ref)}`, "g");
|
|
1184
|
-
return text.replace(reference, (_all, name) => `./.github/workflows/${flatFile(name)}`);
|
|
1185
|
-
}
|
|
1186
|
-
/**
|
|
1187
|
-
* `text` with each reference to a hosted composite action in `names` at `home` rewritten to its folder in the same
|
|
1188
|
-
* checkout (`./ci/actions/<name>`). For the written copy of a reusable in the repo that hosts it, which only that
|
|
1189
|
-
* repo's own callers run: a change to the action then takes effect at the PR's own commit, instead of waiting for
|
|
1190
|
-
* the frozen copy in `theholocron/.github` that `home` still names. An action not in `names` keeps its full ref.
|
|
1191
|
-
*/
|
|
1192
|
-
function localizeActions(text, names, home = CI_HOME) {
|
|
1193
|
-
return names.reduce((result, name) => result.replaceAll(`${home.actions}/${name}@${home.ref}`, `./ci/actions/${name}`), text);
|
|
1194
|
-
}
|
|
1195
|
-
// src/generators/github-action-thin-callers/grouped-publish/yaml-scalar.ts
|
|
1196
|
-
/**
|
|
1197
|
-
* A value as a YAML scalar for a `with:` entry. Bare `[` and `{` would parse as
|
|
1198
|
-
* sequence and mapping nodes, so values that start with one (JSON) are single-quoted
|
|
1199
|
-
* and stay strings; a `'` inside is doubled, which is how YAML escapes it in single quotes.
|
|
1200
|
-
*/
|
|
1201
|
-
function yamlScalar(value) {
|
|
1202
|
-
if (value === true) return "true";
|
|
1203
|
-
if (value === false) return "false";
|
|
1204
|
-
const text = String(value);
|
|
1205
|
-
return text.startsWith("[") || text.startsWith("{") ? `'${text.replaceAll("'", "''")}'` : text;
|
|
1206
|
-
}
|
|
1207
|
-
// src/generators/github-action-thin-callers/workflow-title/workflow-title.ts
|
|
1208
|
-
/** Words of a task id that are written in capitals, not title case. */
|
|
1209
|
-
const ACRONYMS = {
|
|
1210
|
-
ci: "CI",
|
|
1211
|
-
dco: "DCO"
|
|
1212
|
-
};
|
|
1213
|
-
/**
|
|
1214
|
-
* The title a task's runs carry in a run list: the id's words in title case (`deploy-sentinel` is `Deploy Sentinel`,
|
|
1215
|
-
* `test:unit` is `Test Unit`, `ci` is `CI`). Only the run title uses it; the workflow, job and check names stay the id.
|
|
1216
|
-
*/
|
|
1217
|
-
function workflowTitle(id) {
|
|
1218
|
-
return id.split(/[:-]/).filter(Boolean).map((word) => ACRONYMS[word] ?? word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
1219
|
-
}
|
|
1220
|
-
// src/generators/github-action-thin-callers/with-run-name/with-run-name.ts
|
|
1221
|
-
/**
|
|
1222
|
-
* Add a `run-name:` after the `name:` line of a thin caller, so a run is titled for what it did (`Deploy Sentinel
|
|
1223
|
-
* (manual)`) and not with the task id. Only the events the caller has `triggers` for get a branch: a manual run says so,
|
|
1224
|
-
* a scheduled one says so, a pull request run keeps the pull request title after the title, and any other event, a push
|
|
1225
|
-
* included, is the title alone. A push run has no commit message in it: a squash commit's whole message, trailers
|
|
1226
|
-
* included, would be the title, and an expression cannot cut it to its first line. The workflow `name:`, job names and
|
|
1227
|
-
* so check names are not touched.
|
|
1228
|
-
*/
|
|
1229
|
-
function withRunName(yaml, id, triggers) {
|
|
1230
|
-
if (/^run-name:/m.test(yaml)) return yaml;
|
|
1231
|
-
const title = workflowTitle(id);
|
|
1232
|
-
const branches = [];
|
|
1233
|
-
if (triggers.includes("workflow_dispatch")) branches.push(`github.event_name == 'workflow_dispatch' && '${title} (manual)'`);
|
|
1234
|
-
if (triggers.includes("schedule")) branches.push(`github.event_name == 'schedule' && '${title} (scheduled)'`);
|
|
1235
|
-
if (triggers.some((t) => t === "pull_request" || t === "pull_request_target")) branches.push(`(github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && format('${title}: {0}', github.event.pull_request.title)`);
|
|
1236
|
-
const value = branches.length === 0 ? title : `"\${{ ${[...branches, `'${title}'`].join(" || ")} }}"`;
|
|
1237
|
-
return yaml.replace(/^(name: [^\n]*\n)/m, `$1\nrun-name: ${value}\n`);
|
|
1238
|
-
}
|
|
1239
|
-
// src/generators/aggregate-caller/aggregate-caller.ts
|
|
1240
|
-
/**
|
|
1241
|
-
* The thin caller of the `ci` aggregate: a `pull_request` workflow with one job, `ci`, that calls the reusable `ci.yml`
|
|
1242
|
-
* with the ids to wait on. The job runs from the PR's own workflow file, so a PR that changes the ids is judged by them.
|
|
1243
|
-
* It holds the permissions the reusable needs and nothing else; the reusable reads the Checks and status APIs only.
|
|
1244
|
-
*/
|
|
1245
|
-
function aggregateCaller({ expected, statuses }) {
|
|
1246
|
-
return withRunName([
|
|
1247
|
-
`name: ci`,
|
|
1248
|
-
``,
|
|
1249
|
-
`on: # yamllint disable-line rule:truthy`,
|
|
1250
|
-
` pull_request:`,
|
|
1251
|
-
``,
|
|
1252
|
-
`concurrency:`,
|
|
1253
|
-
` group: ci-\${{ github.ref }}`,
|
|
1254
|
-
` cancel-in-progress: true`,
|
|
1255
|
-
``,
|
|
1256
|
-
`permissions:`,
|
|
1257
|
-
` checks: read`,
|
|
1258
|
-
` statuses: read`,
|
|
1259
|
-
` contents: read`,
|
|
1260
|
-
``,
|
|
1261
|
-
`jobs:`,
|
|
1262
|
-
` ci:`,
|
|
1263
|
-
` name: ci`,
|
|
1264
|
-
` uses: ${reusableWorkflowRef("ci.yml")}`,
|
|
1265
|
-
` with:`,
|
|
1266
|
-
` expected: ${yamlScalar(JSON.stringify(expected))}`,
|
|
1267
|
-
` statuses: ${yamlScalar(JSON.stringify(statuses))}`,
|
|
1268
|
-
``
|
|
1269
|
-
].join("\n"), "ci", ["pull_request"]);
|
|
1270
|
-
}
|
|
1271
832
|
// src/templates/workflows/annotate.yml
|
|
1272
833
|
var annotate_default = "name: annotate\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\nconcurrency:\n group: review-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n checks: write\n pull-requests: write\n\njobs:\n annotate:\n name: annotate\n uses: theholocron/.github/.github/workflows/annotate.yml@main\n secrets: inherit\n";
|
|
1273
834
|
// src/templates/workflows/build.yml
|
|
@@ -2070,6 +1631,27 @@ function readWorkspacePackages(repoRoot) {
|
|
|
2070
1631
|
};
|
|
2071
1632
|
}).sort((a, b) => packageLocation(a).localeCompare(packageLocation(b)));
|
|
2072
1633
|
}
|
|
1634
|
+
// src/generators/hosted-action-refs/hosted-action-refs.ts
|
|
1635
|
+
/**
|
|
1636
|
+
* The composite actions the repo that serves them runs from its own checkout, not from the frozen copy in
|
|
1637
|
+
* `theholocron/.github`: `format` exists only in `theholocron/holocron` (the frozen repo never got a copy), and
|
|
1638
|
+
* `codecov-upload` holds the upload loop, so a change to it (a retry) takes effect on the pull request that makes it
|
|
1639
|
+
* (#2124); the frozen copy never changes again.
|
|
1640
|
+
*/
|
|
1641
|
+
const LOCAL_ACTIONS = /* @__PURE__ */ new Set(["format", "codecov-upload"]);
|
|
1642
|
+
const escaped = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1643
|
+
/**
|
|
1644
|
+
* `text` (a reusable workflow already moved to `home`) with its composite-action references made resolvable in the repo
|
|
1645
|
+
* that serves the reusables, before `ci-v1` exists to resolve `theholocron/holocron/ci/actions/<name>@ci-v1`: a local action
|
|
1646
|
+
* is called by path from the checkout (`./ci/actions/format`), every other one keeps the frozen
|
|
1647
|
+
* copy in `theholocron/.github` at `main`, which is what it ran before the home moved. Only the copies this repo writes
|
|
1648
|
+
* to its own `.github/workflows` go through here; the reusables other repos call keep the `home` reference. Once the tag
|
|
1649
|
+
* exists the frozen spelling can go (the nested references inside `ci/actions` follow it).
|
|
1650
|
+
*/
|
|
1651
|
+
function hostedActionRefs(text, home = CI_HOME) {
|
|
1652
|
+
const reference = new RegExp(`${escaped(home.actions)}/([\\w.-]+)@${escaped(home.ref)}`, "g");
|
|
1653
|
+
return text.replace(reference, (_all, name) => LOCAL_ACTIONS.has(name) ? `./ci/actions/${name}` : `${TEMPLATE_HOME.actions}/${name}@${TEMPLATE_HOME.ref}`);
|
|
1654
|
+
}
|
|
2073
1655
|
// src/generators/github-action-reusable-workflows/github-action-reusable-workflows.ts
|
|
2074
1656
|
/**
|
|
2075
1657
|
* The **reusable** GitHub Actions surface pushed to `theholocron/.github` by
|
|
@@ -2099,7 +1681,7 @@ function hostedReusableWorkflows() {
|
|
|
2099
1681
|
return new Map(Object.entries(REUSABLE_WORKFLOWS).filter(([, text]) => {
|
|
2100
1682
|
const triggers = workflowTriggers(text);
|
|
2101
1683
|
return triggers.length === 1 && triggers[0] === "workflow_call";
|
|
2102
|
-
}));
|
|
1684
|
+
}).map(([id, text]) => [id, hostedActionRefs(text)]));
|
|
2103
1685
|
}
|
|
2104
1686
|
/**
|
|
2105
1687
|
* The path in `theholocron/.github` of the reusable workflow `id`: the old file name, because the frozen copies live
|
|
@@ -2111,7 +1693,7 @@ function remotePath(id) {
|
|
|
2111
1693
|
/** Composite actions → `.github/actions/<name>/action.yml` (key includes `/action`). */
|
|
2112
1694
|
const REUSABLE_ACTIONS = rehomeAll(Object.fromEntries(Object.entries(ACTIONS).map(([name, text]) => [`${name}/action`, text])));
|
|
2113
1695
|
/** GitHub starter-workflow metadata → `workflow-templates/<name>.properties.json`. */
|
|
2114
|
-
const WORKFLOW_TEMPLATE_PROPERTIES = {
|
|
1696
|
+
const WORKFLOW_TEMPLATE_PROPERTIES = { label: JSON.stringify({
|
|
2115
1697
|
name: "Bookkeeping",
|
|
2116
1698
|
description: "Label and track issues and pull requests.",
|
|
2117
1699
|
iconName: "octicon tag"
|
|
@@ -2143,10 +1725,8 @@ function reusableTemplates() {
|
|
|
2143
1725
|
for (const [name, body] of Object.entries(REUSABLE_ACTIONS)) out.set(`.github/actions/${name}.yml`, `${header}${body}`);
|
|
2144
1726
|
for (const [id, body] of Object.entries(REUSABLE_WORKFLOWS)) out.set(remotePath(id), `${header}${body}`);
|
|
2145
1727
|
for (const [id, template] of Object.entries(WORKFLOW_TEMPLATES)) {
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
const body = legacyCaller(id, template);
|
|
2149
|
-
out.set(`workflow-templates/${name}.yml`, `${header}${body}`);
|
|
1728
|
+
const name = workflowFile(id).replace(/\.yml$/, "");
|
|
1729
|
+
out.set(`workflow-templates/${name}.yml`, `${header}${template}`);
|
|
2150
1730
|
const props = WORKFLOW_TEMPLATE_PROPERTIES[name];
|
|
2151
1731
|
if (props) out.set(`workflow-templates/${name}.properties.json`, props);
|
|
2152
1732
|
}
|
|
@@ -4677,4 +4257,4 @@ function createConfig$9() {
|
|
|
4677
4257
|
function createIgnoreConfig() {
|
|
4678
4258
|
return `${workflowHeader()}${_yamlignore_default}`;
|
|
4679
4259
|
}
|
|
4680
|
-
export { AGGREGATE_CHECK, AGGREGATE_CHECK_NAME, AGGREGATE_SHADOW_CHECK_NAME, AGGREGATE_TIMEOUT_MS, CI_ORDER, DCO_CHECK, DEFAULT_ORG, DOCUMENTATION_FLAG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS, TEMPLATE_HOME, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, aggregateChecks, aggregatePoster, checkPackageScripts, checkReleaseLines, codecovFlagNames, codecovUploads, compareVersions, createAstromech, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, describeTasks, evaluateAggregate, extractPreviewConfig, formatJson, frozenReusablePaths, generateCombinedDeployContent, generateThinCallerContent, hostedReusableWorkflows, idFromSource, isDeprecated, isGeneratedScript, isTask,
|
|
4260
|
+
export { AGGREGATE_CHECK, AGGREGATE_CHECK_NAME, AGGREGATE_SHADOW_CHECK_NAME, AGGREGATE_TIMEOUT_MS, CI_ORDER, DCO_CHECK, DEFAULT_ORG, DOCUMENTATION_FLAG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS, TEMPLATE_HOME, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, aggregateChecks, aggregatePoster, checkPackageScripts, checkReleaseLines, codecovFlagNames, codecovUploads, compareVersions, createAstromech, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, describeTasks, evaluateAggregate, extractPreviewConfig, formatJson, frozenReusablePaths, generateCombinedDeployContent, generateThinCallerContent, hostedReusableWorkflows, idFromSource, isDeprecated, isGeneratedScript, isTask, legacyFile, legacyName, localize, matchNamespace, mergeScripts, normalizeWorkflowWith, packageLocation, planSuites, planTasks, postAggregate, readWorkspacePackages, recordDeploys, requiredChecks, requiredChecksVerdict, resolveTaskName, reusableTemplates, runCi, runGroup, runTask, scriptName, scriptsFor, stampDeprecated, suiteMembers, taskKey, wedgeFix, workflowFile, workflowKey, workflowKeys, workspacePackages };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@commitlint/lint": "^21.3.0",
|
|
56
56
|
"@commitlint/load": "^21.3.0",
|
|
57
57
|
"@commitlint/types": "^21.3.0",
|
|
58
|
-
"@theholocron/datapad": "5.1.
|
|
59
|
-
"@theholocron/json-utils": "^2.0.0",
|
|
58
|
+
"@theholocron/datapad": "5.1.2",
|
|
60
59
|
"@theholocron/fs-utils": "^2.0.0",
|
|
60
|
+
"@theholocron/json-utils": "^2.0.0",
|
|
61
61
|
"@theholocron/misc-utils": "^2.0.0",
|
|
62
62
|
"@theholocron/pkg-utils": "^2.0.0"
|
|
63
63
|
},
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"tsdown": "^0.23.7",
|
|
74
74
|
"typescript": "^6.0.3",
|
|
75
75
|
"vitest": "^5.1.2",
|
|
76
|
-
"@theholocron/ci": "1.0.
|
|
76
|
+
"@theholocron/ci": "1.0.2",
|
|
77
77
|
"@theholocron/commitlint-config": "^9.0.0",
|
|
78
78
|
"@theholocron/eslint-config": "^9.0.0",
|
|
79
79
|
"@theholocron/rollup-plugin-transform-template": "^9.0.0",
|