Remove key input and use Import GPG GitHub Action instead

This commit is contained in:
CrazyMax
2020-05-10 16:02:05 +02:00
parent b965206285
commit f3c3945401
7 changed files with 162 additions and 37 deletions
-9
View File
@@ -2,13 +2,11 @@ import * as git from './git';
import * as installer from './installer';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as fs from 'fs';
async function run(): Promise<void> {
try {
const version = core.getInput('version') || 'latest';
const args = core.getInput('args');
const key = core.getInput('key');
const workdir = core.getInput('workdir') || '.';
const goreleaser = await installer.getGoReleaser(version);
@@ -33,13 +31,6 @@ async function run(): Promise<void> {
}
}
if (key) {
core.info('🔑 Importing signing key...');
let path = `${process.env.HOME}/key.asc`;
fs.writeFileSync(path, key, {mode: 0o600});
await exec.exec('gpg', ['--import', path]);
}
core.info('🏃 Running GoReleaser...');
await exec.exec(`${goreleaser} ${args}${snapshot}`);
} catch (error) {