mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-07-05 20:49:35 +00:00
Resolves the GoReleaser version from a file. Currently supports the
asdf/mise `.tool-versions` format; resolved value takes precedence
over the `version` input.
# .tool-versions
goreleaser 2.13.0
- uses: goreleaser/goreleaser-action@v7
with:
version-file: .tool-versions
args: release --clean
Path is resolved relative to `workdir` unless absolute. Bare semvers
are auto-prefixed with `v`; constraint expressions and `latest` are
returned as-is. Multiple fallback versions per asdf convention are
accepted but only the first is used.
Refs #541
Closes #542
Co-authored-by: Anthony Couvreur <22034450+acouvreur@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
25 lines
674 B
TypeScript
25 lines
674 B
TypeScript
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;
|
|
versionFile: string;
|
|
args: string;
|
|
workdir: string;
|
|
installOnly: boolean;
|
|
}
|
|
|
|
export async function getInputs(): Promise<Inputs> {
|
|
return {
|
|
distribution: core.getInput('distribution') || 'goreleaser',
|
|
version: core.getInput('version') || '~> v2',
|
|
versionFile: core.getInput('version-file'),
|
|
args: core.getInput('args'),
|
|
workdir: core.getInput('workdir') || '.',
|
|
installOnly: core.getBooleanInput('install-only')
|
|
};
|
|
}
|