diff --git a/scripts/downloadGithubReleasePackage.ts b/scripts/downloadGithubReleasePackage.ts index f022358a..36fc70c5 100644 --- a/scripts/downloadGithubReleasePackage.ts +++ b/scripts/downloadGithubReleasePackage.ts @@ -11,19 +11,26 @@ async function main() { throw new Error('TAG environment variable is required') } - const githubRelease: GithubRelease = await fetch( - `https://api.github.com/repos/${config.repositoryOwner}/${config.repository}/releases/tags/${tag}`, - { - headers: token - ? { - Authorization: bearer(token), - } - : undefined, - }, - ).then((res) => res.json()) + console.debug('tag', tag) + + const url = `https://api.github.com/repos/${config.repositoryOwner}/${config.repository}/releases/tags/${tag}` + + console.debug('url', url) + + const githubRelease: GithubRelease = await fetch(url, { + headers: token + ? { + Authorization: bearer(token), + } + : undefined, + }).then((res) => res.json()) + + console.debug('githubRelease', githubRelease) const functionZip = await findFunctionZip(githubRelease.assets) + console.debug('functionZip', functionZip) + if (!functionZip) { throw new Error('No function zip found') }