mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-06-29 23:47:30 +00:00
Add install-only test job and fix action.yml
This commit is contained in:
+5
-2
@@ -7,17 +7,20 @@ import {dirname} from 'path';
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const version = core.getInput('version') || 'latest';
|
||||
const isInstallOnly = /^true$/i.test(core.getInput('install-only'));
|
||||
const args = core.getInput('args');
|
||||
const workdir = core.getInput('workdir') || '.';
|
||||
const isInstallOnly = /^true$/i.test(core.getInput('install-only'));
|
||||
const goreleaser = await installer.getGoReleaser(version);
|
||||
core.info(`✅ GoReleaser installed successfully`);
|
||||
|
||||
if (isInstallOnly) {
|
||||
const goreleaserDir = dirname(goreleaser);
|
||||
core.addPath(goreleaserDir);
|
||||
core.debug(`Added ${goreleaserDir} to PATH`);
|
||||
return;
|
||||
} else if (!args) {
|
||||
throw new Error('args input required');
|
||||
}
|
||||
const args = core.getInput('args', {required: true});
|
||||
|
||||
if (workdir && workdir !== '.') {
|
||||
core.info(`📂 Using ${workdir} as working directory...`);
|
||||
|
||||
Reference in New Issue
Block a user