import { type Ps } from "webappwiz/system"; import type { Git } from "../git/git.js"; import type { Workflows } from "../github/workflows.js"; import type { CheckReport } from "../step.js"; /** Pass `git` or `workflows` to run `GithubActions` against fakes in tests; the real ones by default. */ export interface GithubActionsOptions { git?: Git; workflows?: Workflows; ps?: Ps; /** * What a refused run says to run to set up npm's trust, which calls * `Release.trust()`; `bunx @webappwiz/cli ship trust` by default. */ trustCommand?: string; } /** Use it as `releases.npm`'s `via`: `githubActions()` makes one. */ export declare function githubActions(opts?: GithubActionsOptions): GithubActions; /** * Publishes by running the generated publish workflow on GitHub Actions, where * npm trusts the job, rather than from this machine. It pushes the release * commit, starts the workflow on it, and follows the run; whether a version * went out is still the registry's to say, never the run's green check. * * A release has one run for all its packages, found again by its commit: a * second package reuses it, and a resumed release reuses a run still going or * finished, and reruns one that failed. */ export declare class GithubActions { /** The workflow's file name, as npm's trusted publisher entry names it. */ readonly file: string; private readonly git; private readonly workflows; /** The attempt of the run a rerun started from, whose result is stale until a newer one shows. */ private rerunFrom?; private readonly trustCommand; constructor(opts?: GithubActionsOptions); /** The repository the workflow runs in, as `owner/name`. */ repo(): Promise; /** * Gets a run going for the release commit: pushes the branch so GitHub has * the commit, then starts the workflow, reruns its failed run, or leaves * the run it has alone. Returns once that is asked, not once it ends. */ start(): Promise; /** * Where the run stands, as a step check reads it: passed once it succeeded, * throwing when it ended any other way, and otherwise its status and page. * `live` says whether the registry already serves the package, which is * all that passes a release that never started a run. */ watch(name: string, live: boolean): Promise; private failure; /** What to run for npm to trust the workflow, once per package. */ private setup; }