mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-07-10 02:57:30 +00:00
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:
+2
-6
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user