Compare commits

..

2 Commits

Author SHA1 Message Date
63aa003870 Update README for semantic versioning 2019-11-08 16:51:08 +00:00
8dd2e77965 Update description 2019-11-08 16:50:57 +00:00
4 changed files with 6 additions and 24 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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;

View File

@ -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;
}