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
Generated Vendored
-8
View File
@@ -1281,13 +1281,11 @@ const git = __importStar(__webpack_require__(453));
const installer = __importStar(__webpack_require__(749));
const core = __importStar(__webpack_require__(470));
const exec = __importStar(__webpack_require__(986));
const fs = __importStar(__webpack_require__(747));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const version = core.getInput('version') || 'latest';
const args = core.getInput('args');
const key = core.getInput('key');
const workdir = core.getInput('workdir') || '.';
const goreleaser = yield installer.getGoReleaser(version);
const commit = yield git.getShortCommit();
@@ -1309,12 +1307,6 @@ function run() {
core.info(`${tag} tag found for commit ${commit}`);
}
}
if (key) {
core.info('🔑 Importing signing key...');
let path = `${process.env.HOME}/key.asc`;
fs.writeFileSync(path, key, { mode: 0o600 });
yield exec.exec('gpg', ['--import', path]);
}
core.info('🏃 Running GoReleaser...');
yield exec.exec(`${goreleaser} ${args}${snapshot}`);
}