import { EventEmitter } from 'node:events'; /** Token-based authentication. */ export interface Auth { token: string; } /** An asset to upload: a path string, or `{ name, path }` to rename on upload. */ export type AssetInput = string | { name: string; path: string; }; /** Options accepted by {@link Release}. */ export interface ReleaseOptions { auth?: Auth; owner?: string; repo?: string; body?: string; target_commitish?: string; tag_name?: string; name?: string; draft?: boolean; prerelease?: boolean; generate_release_notes?: boolean; endpoint?: string; dryRun?: boolean; yes?: boolean; workpath?: string; assets?: AssetInput[] | false; cli?: boolean; /** Prefix for the derived tag and title (default `v`; `''` for none). */ tagPrefix?: string; } /** Completion callback. `result` is the GitHub createRelease response data. */ export type ReleaseCallback = (err: Error | null, result?: unknown) => void; interface OptionsSpec { required: string[]; defaults: Record; } declare const OPTIONS: OptionsSpec; /** Report any required options that are missing. */ declare function validate(options: ReleaseOptions): { missing: string[]; }; /** {@link Release} with its static helpers attached. */ export interface ReleaseFn { (options: ReleaseOptions, callback: ReleaseCallback): EventEmitter; OPTIONS: OptionsSpec; validate: typeof validate; } declare const ghRelease: ReleaseFn; export { ghRelease, OPTIONS, validate }; export default ghRelease;