fix: don't depend on the GitHub API to check release (#391)

* fix: don't depend on the GitHub API to check release

* chore: update generated content

---------

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-01-30 14:11:41 +01:00
committed by GitHub
parent 9754a253a8
commit f82d6c1c34
16 changed files with 103 additions and 827 deletions
+2 -6
View File
@@ -7,12 +7,8 @@ import * as github from './github';
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
export async function install(distribution: string, version: string, githubToken: string): Promise<string> {
const release: github.Release | null = await github.getRelease(distribution, version, githubToken);
if (!release) {
throw new Error(`Cannot find GoReleaser ${version} release`);
}
export async function install(distribution: string, version: string): Promise<string> {
const release: github.GitHubRelease = await github.getRelease(distribution, version);
const filename = getFilename(distribution);
const downloadUrl = util.format(
'https://github.com/goreleaser/%s/releases/download/%s/%s',