mirror of
https://github.com/actions/setup-go.git
synced 2025-05-04 22:15:17 +00:00
use golang-dl release data
This commit is contained in:
@ -186,10 +186,9 @@ function getLatestVersion(version) {
|
||||
function getAvailableVersions() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let rest = new restm.RestClient('setup-go');
|
||||
let tags = (yield rest.get('https://api.github.com/repos/golang/go/git/refs/tags')).result || [];
|
||||
return tags
|
||||
.filter(tag => tag.ref.match(/go\d+\.[\w\.]+/g))
|
||||
.map(tag => tag.ref.replace('refs/tags/go', ''));
|
||||
let tags = (yield rest.get('https://golang.org/dl/?mode=json&include=all'))
|
||||
.result || [];
|
||||
return tags.map(tag => tag.version.replace('go', ''));
|
||||
});
|
||||
}
|
||||
function getPossibleVersions(version) {
|
||||
|
Reference in New Issue
Block a user