mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-07-09 08:57:31 +00:00
refactor: setup context (#325)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import * as os from 'os';
|
||||
import * as core from '@actions/core';
|
||||
|
||||
export const osPlat: string = os.platform();
|
||||
export const osArch: string = os.arch();
|
||||
|
||||
export interface Inputs {
|
||||
distribution: string;
|
||||
version: string;
|
||||
args: string;
|
||||
workdir: string;
|
||||
installOnly: boolean;
|
||||
}
|
||||
|
||||
export async function getInputs(): Promise<Inputs> {
|
||||
return {
|
||||
distribution: core.getInput('distribution') || 'goreleaser',
|
||||
version: core.getInput('version'),
|
||||
args: core.getInput('args'),
|
||||
workdir: core.getInput('workdir') || '.',
|
||||
installOnly: core.getBooleanInput('install-only')
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user