0
1
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
Sergey Dolin 9dbfd2f3c5
Merge 6ecdea2b64 into 99176a8f9a 2024-04-15 09:53:00 -07:00
Andy Brody 99176a8f9a
Update README.md with V5 release notes (#459) 2024-04-15 09:19:11 -05:00
Sergey Dolin 6ecdea2b64 Add .tool-versions support 2023-07-27 19:39:31 +02:00
3 changed files with 15 additions and 0 deletions

View File

@ -8,6 +8,14 @@ This action sets up a go environment for use in actions by:
- Optionally downloading and caching a version of Go by version and adding to `PATH`.
- Registering problem matchers for error output.
# V5
The V5 edition of the action offers:
- Upgraded Node.js runtime from node16 to node20
See full release notes on the [releases page](https://github.com/actions/setup-go/releases).
# V4
The V4 edition of the action offers:

4
dist/setup/index.js vendored
View File

@ -88332,6 +88332,10 @@ function parseGoVersionFile(versionFilePath) {
const match = contents.match(/^go (\d+(\.\d+)*)/m);
return match ? match[1] : '';
}
else if (path.basename(versionFilePath) === '.tool-versions') {
const match = contents.match(/^golang\s+(\d+(\.\d+)*)/m);
return match ? match[1] : '';
}
return contents.trim();
}
exports.parseGoVersionFile = parseGoVersionFile;

View File

@ -426,6 +426,9 @@ export function parseGoVersionFile(versionFilePath: string): string {
) {
const match = contents.match(/^go (\d+(\.\d+)*)/m);
return match ? match[1] : '';
} else if (path.basename(versionFilePath) === '.tool-versions') {
const match = contents.match(/^golang\s+(\d+(\.\d+)*)/m);
return match ? match[1] : '';
}
return contents.trim();