diff --git a/src/main.ts b/src/main.ts index 7288ca4..6a8dff6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,16 +29,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 = {}