File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 66
77This action sets up a go environment for use in actions by:
88
9- - optionally downloading and caching a version of go by version and adding to PATH
9+ - optionally downloading and caching a version of Go by version and adding to PATH
1010- registering problem matchers for error output
1111
1212# Usage
1919- uses : actions/checkout@master
2020- uses : actions/setup-go@v1
2121 with :
22- version : ' 1.9.3' // The Go version to download (if necessary) and use.
22+ go- version : ' 1.9.3' // The Go version to download (if necessary) and use.
2323- run : go run hello.go
2424` ` `
2525
3737 - name : Setup go
3838 uses : actions/setup-go@v1
3939 with :
40- version : ${{ matrix.go }}
40+ go- version : ${{ matrix.go }}
4141 - run : go run hello.go
4242` ` `
4343
Original file line number Diff line number Diff line change @@ -2,9 +2,12 @@ name: 'Setup Go environment'
22description : ' Setup a Go environment and add it to the PATH, additionally providing proxy support'
33author : ' GitHub'
44inputs :
5- version :
5+ go- version :
66 description : ' The Go version to download (if necessary) and use. Example: 1.9.3'
77 default : ' 1.10'
8+ # Deprecated option, do not use. Will not be supported after October 1, 2019
9+ version :
10+ description : ' Deprecated. Use go-version instead. Will not be supported after October 1, 2019'
811runs :
912 using : ' node12'
1013 main : ' lib/setup-go.js'
Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ function run() {
2525 // Version is optional. If supplied, install / use from the tool cache
2626 // If not supplied then task is still used to setup proxy, auth, etc...
2727 //
28- const version = core . getInput ( 'version' ) ;
28+ let version = core . getInput ( 'version' ) ;
29+ if ( ! version ) {
30+ version = core . getInput ( 'go-version' ) ;
31+ }
2932 if ( version ) {
3033 yield installer . getGo ( version ) ;
3134 }
Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ async function run() {
88 // Version is optional. If supplied, install / use from the tool cache
99 // If not supplied then task is still used to setup proxy, auth, etc...
1010 //
11- const version = core . getInput ( 'version' ) ;
11+ let version = core . getInput ( 'version' ) ;
12+ if ( ! version ) {
13+ version = core . getInput ( 'go-version' ) ;
14+ }
1215 if ( version ) {
1316 await installer . getGo ( version ) ;
1417 }
You can’t perform that action at this time.
0 commit comments