mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-08-29 23:08:28 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e93a47264 | ||
|
|
8c5f3a80d4 | ||
|
|
c71e1672a2 |
@@ -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
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user