mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-07-09 08:37:29 +00:00
feat: Use native GitHub Action tools to download assets and use GitHub API (#187)
* Use native GitHub Action tools to download assets and use GitHub API * Fix unexpected output when tag not found * Use GitHub Action exec * Add screenshot Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
+3
-7
@@ -4,7 +4,7 @@ import * as core from '@actions/core';
|
||||
import * as exec from '@actions/exec';
|
||||
import * as fs from 'fs';
|
||||
|
||||
export async function run(silent?: boolean) {
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const version = core.getInput('version') || 'latest';
|
||||
const args = core.getInput('args');
|
||||
@@ -37,15 +37,11 @@ export async function run(silent?: boolean) {
|
||||
core.info('🔑 Importing signing key...');
|
||||
let path = `${process.env.HOME}/key.asc`;
|
||||
fs.writeFileSync(path, key, {mode: 0o600});
|
||||
await exec.exec('gpg', ['--import', path], {
|
||||
silent: silent
|
||||
});
|
||||
await exec.exec('gpg', ['--import', path]);
|
||||
}
|
||||
|
||||
core.info('🏃 Running GoReleaser...');
|
||||
await exec.exec(`${goreleaser} ${args}${snapshot}`, undefined, {
|
||||
silent: silent
|
||||
});
|
||||
await exec.exec(`${goreleaser} ${args}${snapshot}`);
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user