mirror of
				https://github.com/actions/setup-go.git
				synced 2025-10-31 15:50:33 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			v1.1.2
			...
			ethomson/u
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 63aa003870 | ||
|   | 8dd2e77965 | 
| @@ -16,7 +16,7 @@ See [action.yml](action.yml) | ||||
| Basic: | ||||
| ```yaml | ||||
| steps: | ||||
| - uses: actions/checkout@master | ||||
| - uses: actions/checkout@v1 | ||||
| - uses: actions/setup-go@v1 | ||||
|   with: | ||||
|     go-version: '1.9.3' # The Go version to download (if necessary) and use. | ||||
| @@ -33,7 +33,7 @@ jobs: | ||||
|         go: [ '1.8', '1.9.3', '1.10.x' ] | ||||
|     name: Go ${{ matrix.go }} sample | ||||
|     steps: | ||||
|       - uses: actions/checkout@master | ||||
|       - uses: actions/checkout@v1 | ||||
|       - name: Setup go | ||||
|         uses: actions/setup-go@v1 | ||||
|         with: | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| name: 'Setup Go environment' | ||||
| description: 'Setup a Go environment and add it to the PATH, additionally providing proxy support' | ||||
| name: 'Setup Go' | ||||
| description: 'Set up a specific version of Go and add the command-line tools to the PATH' | ||||
| author: 'GitHub' | ||||
| inputs:  | ||||
|   go-version: | ||||
|   | ||||
| @@ -72,7 +72,6 @@ function acquireGo(version) { | ||||
|         // | ||||
|         let fileName = getFileName(version); | ||||
|         let downloadUrl = getDownloadUrl(fileName); | ||||
|         core.debug('Downloading Go from: ' + downloadUrl); | ||||
|         let downloadPath = null; | ||||
|         try { | ||||
|             downloadPath = yield tc.downloadTool(downloadUrl); | ||||
| @@ -103,14 +102,8 @@ function acquireGo(version) { | ||||
|     }); | ||||
| } | ||||
| function getFileName(version) { | ||||
|     const arches = { | ||||
|         x64: 'amd64', | ||||
|         arm: 'armv6l', | ||||
|         arm64: 'arm64', | ||||
|         default: '386' | ||||
|     }; | ||||
|     const platform = osPlat == 'win32' ? 'windows' : osPlat; | ||||
|     const arch = arches[osArch] || arches['default']; | ||||
|     const arch = osArch == 'x64' ? 'amd64' : '386'; | ||||
|     const ext = osPlat == 'win32' ? 'zip' : 'tar.gz'; | ||||
|     const filename = util.format('go%s.%s-%s.%s', version, platform, arch, ext); | ||||
|     return filename; | ||||
|   | ||||
| @@ -57,9 +57,6 @@ async function acquireGo(version: string): Promise<string> { | ||||
|   // | ||||
|   let fileName: string = getFileName(version); | ||||
|   let downloadUrl: string = getDownloadUrl(fileName); | ||||
|  | ||||
|   core.debug('Downloading Go from: ' + downloadUrl); | ||||
|  | ||||
|   let downloadPath: string | null = null; | ||||
|   try { | ||||
|     downloadPath = await tc.downloadTool(downloadUrl); | ||||
| @@ -92,15 +89,8 @@ async function acquireGo(version: string): Promise<string> { | ||||
| } | ||||
|  | ||||
| function getFileName(version: string): string { | ||||
|   const arches: {[arch: string]: string} = { | ||||
|     x64: 'amd64', | ||||
|     arm: 'armv6l', | ||||
|     arm64: 'arm64', | ||||
|     default: '386' | ||||
|   }; | ||||
|  | ||||
|   const platform: string = osPlat == 'win32' ? 'windows' : osPlat; | ||||
|   const arch: string = arches[osArch] || arches['default']; | ||||
|   const arch: string = osArch == 'x64' ? 'amd64' : '386'; | ||||
|   const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz'; | ||||
|   const filename: string = util.format( | ||||
|     'go%s.%s-%s.%s', | ||||
| @@ -109,7 +99,6 @@ function getFileName(version: string): string { | ||||
|     arch, | ||||
|     ext | ||||
|   ); | ||||
|  | ||||
|   return filename; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user