diff --git a/src/main.ts b/src/main.ts index 4335d16..fecb820 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,16 +28,9 @@ async function run(): Promise { } // Setup the API - let octokit: InstanceType | undefined - try { - octokit = github.getOctokit(token) - } catch (e: unknown) { - if (e instanceof Error) { - core.setFailed( - `Could not authenticate to GitHub Releases API with provided token\n${e.message}` - ) - } - } + const octokit = await setup_octokit(token) + + const releases = await pull_releases(octokit) // Get the release info for the desired release let release = {}