mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-08-30 16:58:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e93a47264 | ||
|
|
8c5f3a80d4 | ||
|
|
c71e1672a2 |
@@ -2,7 +2,10 @@ name: test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches: master
|
||||||
push:
|
push:
|
||||||
|
branches: master
|
||||||
|
tags:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -28,4 +31,4 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
args: release --snapshot --rm-dist
|
args: release --skip-publish --rm-dist
|
||||||
|
|||||||
+11
-1
@@ -25,8 +25,18 @@ function run() {
|
|||||||
const version = core.getInput('version') || 'latest';
|
const version = core.getInput('version') || 'latest';
|
||||||
const args = core.getInput('args');
|
const args = core.getInput('args');
|
||||||
const goreleaser = yield installer.getGoReleaser(version);
|
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...');
|
console.log('🏃 Running GoReleaser...');
|
||||||
yield exec.exec(`${goreleaser} ${args}`);
|
yield exec.exec(`${goreleaser} ${args}${snapshot}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|||||||
+11
-1
@@ -8,8 +8,18 @@ async function run() {
|
|||||||
const args = core.getInput('args');
|
const args = core.getInput('args');
|
||||||
const goreleaser = await installer.getGoReleaser(version);
|
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...');
|
console.log('🏃 Running GoReleaser...');
|
||||||
await exec.exec(`${goreleaser} ${args}`);
|
await exec.exec(`${goreleaser} ${args}${snapshot}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user