Allow to run GoReleaser from a subdirectory (#45)

This commit is contained in:
Boaz Yaniv
2019-12-02 18:54:32 +09:00
committed by CrazyMax
parent 6ec955d9f0
commit 16077aaddc
4 changed files with 20 additions and 5 deletions
+6
View File
@@ -8,8 +8,14 @@ export async function run(silent?: boolean) {
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);
if (workdir && workdir !== '.') {
console.log(`📂 Using ${workdir} as working directory...`)
process.chdir(workdir);
}
let snapshot = '';
if (!process.env.GITHUB_REF || !process.env.GITHUB_REF.startsWith('refs/tags/')) {
console.log(`⚠️ No tag found. Snapshot forced`);