File tree 1 file changed +6
-8
lines changed 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ import io = require("@actions/io");
24
24
const osPlat : string = os . platform ( ) ;
25
25
const osArch : string = os . arch ( ) ;
26
26
27
- interface ITaskRef {
28
- ref : string ;
27
+ interface ITaskRelease {
28
+ tag_name : string ;
29
29
}
30
30
31
31
// Retrieve a list of versions scraping tags from the Github API
@@ -39,16 +39,14 @@ async function fetchVersions(repoToken: string): Promise<string[]> {
39
39
rest = new restm . RestClient ( "setup-task" ) ;
40
40
}
41
41
42
- const tags : ITaskRef [ ] =
42
+ const tags : ITaskRelease [ ] =
43
43
(
44
- await rest . get < ITaskRef [ ] > (
45
- "https://api.github.com/repos/go-task/task/git/refs/tags " ,
44
+ await rest . get < ITaskRelease [ ] > (
45
+ "https://api.github.com/repos/go-task/task/releases " ,
46
46
)
47
47
) . result || [ ] ;
48
48
49
- return tags
50
- . filter ( ( tag ) => tag . ref . match ( / v \d + \. [ \w \. ] + / g) )
51
- . map ( ( tag ) => tag . ref . replace ( "refs/tags/v" , "" ) ) ;
49
+ return tags . map ( ( tag ) => tag . tag_name ) ;
52
50
}
53
51
54
52
// Make partial versions semver compliant.
You can’t perform that action at this time.
0 commit comments