Compare commits

...
3 Commits
Author SHA1 Message Date
CrazyMax 9e93a47264 Update workflow 2019-09-20 23:14:11 +02:00
CrazyMax 8c5f3a80d4 Check if already included 2019-09-20 23:11:26 +02:00
CrazyMax c71e1672a2 Snapshot forced if no tag found 2019-09-20 23:08:16 +02:00
3 changed files with 26 additions and 3 deletions
+4 -1
View File
@@ -2,7 +2,10 @@ name: test
on:
pull_request:
branches: master
push:
branches: master
tags:
jobs:
test:
@@ -28,4 +31,4 @@ jobs:
uses: ./
with:
version: ${{ matrix.version }}
args: release --snapshot --rm-dist
args: release --skip-publish --rm-dist
+11 -1
View File
@@ -25,8 +25,18 @@ function run() {
const version = core.getInput('version') || 'latest';
const args = core.getInput('args');
const goreleaser = yield installer.getGoReleaser(version);
let snapshot = '';
if (!process.env.GITHUB_REF.startsWith('refs/tags/')) {
console.log(`⚠️ No tag found. Snapshot forced`);
if (!args.includes('--snapshot')) {
snapshot = ' --snapshot';
}
}
else {
console.log(`${process.env.GITHUB_REF.split('/')[2]}} tag found`);
}
console.log('🏃 Running GoReleaser...');
yield exec.exec(`${goreleaser} ${args}`);
yield exec.exec(`${goreleaser} ${args}${snapshot}`);
}
catch (error) {
core.setFailed(error.message);
+11 -1
View File
@@ -8,8 +8,18 @@ async function run() {
const args = core.getInput('args');
const goreleaser = await installer.getGoReleaser(version);
let snapshot = '';
if (!process.env.GITHUB_REF!.startsWith('refs/tags/')) {
console.log(`⚠️ No tag found. Snapshot forced`);
if (!args.includes('--snapshot')) {
snapshot = ' --snapshot';
}
} else {
console.log(`${process.env.GITHUB_REF!.split('/')[2]}} tag found`);
}
console.log('🏃 Running GoReleaser...');
await exec.exec(`${goreleaser} ${args}`);
await exec.exec(`${goreleaser} ${args}${snapshot}`);
} catch (error) {
core.setFailed(error.message);
}