Commit 3d57a20 1 parent 3f5ecc4 commit 3d57a20 Copy full SHA for 3d57a20
File tree 4 files changed +45
-9
lines changed
4 files changed +45
-9
lines changed Original file line number Diff line number Diff line change 49
49
version : ${{ matrix.version }}
50
50
args : release --skip-publish --rm-dist
51
51
52
+ install-only :
53
+ runs-on : ${{ matrix.os }}
54
+ strategy :
55
+ fail-fast : false
56
+ matrix :
57
+ version :
58
+ - latest
59
+ - v0.117.0
60
+ steps :
61
+ -
62
+ name : Checkout
63
+
64
+ with :
65
+ fetch-depth : 0
66
+ -
67
+ name : Set up Go
68
+ uses : actions/setup-go@v2
69
+ with :
70
+ go-version : 1.14
71
+ -
72
+ name : GoReleaser
73
+ uses : ./
74
+ with :
75
+ version : ${{ matrix.version }}
76
+ install-only : true
77
+ -
78
+ name : Check
79
+ run : |
80
+ goreleaser check --debug
81
+
52
82
signing :
53
83
runs-on : ${{ matrix.os }}
54
84
if : github.event_name != 'pull_request'
Original file line number Diff line number Diff line change @@ -11,17 +11,17 @@ inputs:
11
11
description : ' GoReleaser version'
12
12
default : ' latest'
13
13
required : false
14
- install-only :
15
- description : ' Just install GoReleaser'
16
- default : ' false'
17
- required : false
18
14
args :
19
15
description : ' Arguments to pass to GoReleaser'
20
- required : true # not required when install-only=true
16
+ required : false
21
17
workdir :
22
18
description : ' Working directory (below repository root)'
23
19
default : ' .'
24
20
required : false
21
+ install-only :
22
+ description : ' Just install GoReleaser'
23
+ default : ' false'
24
+ required : false
25
25
26
26
runs :
27
27
using : ' node12'
Original file line number Diff line number Diff line change @@ -7,17 +7,20 @@ import {dirname} from 'path';
7
7
async function run ( ) : Promise < void > {
8
8
try {
9
9
const version = core . getInput ( 'version' ) || 'latest' ;
10
- const isInstallOnly = / ^ t r u e $ / i . test ( core . getInput ( 'install-only' ) ) ;
10
+ const args = core . getInput ( 'args' ) ;
11
11
const workdir = core . getInput ( 'workdir' ) || '.' ;
12
+ const isInstallOnly = / ^ t r u e $ / i. test ( core . getInput ( 'install-only' ) ) ;
12
13
const goreleaser = await installer . getGoReleaser ( version ) ;
13
14
core . info ( `✅ GoReleaser installed successfully` ) ;
15
+
14
16
if ( isInstallOnly ) {
15
17
const goreleaserDir = dirname ( goreleaser ) ;
16
18
core . addPath ( goreleaserDir ) ;
17
19
core . debug ( `Added ${ goreleaserDir } to PATH` ) ;
18
20
return ;
21
+ } else if ( ! args ) {
22
+ throw new Error ( 'args input required' ) ;
19
23
}
20
- const args = core . getInput ( 'args' , { required : true } ) ;
21
24
22
25
if ( workdir && workdir !== '.' ) {
23
26
core . info ( `📂 Using ${ workdir } as working directory...` ) ;
You can’t perform that action at this time.
0 commit comments