From 7363371ffd2d98879b21dc791e1ccc0d031e7f2d Mon Sep 17 00:00:00 2001
From: altus34 <d.avenante@gmail.com>
Date: Fri, 4 Mar 2022 18:40:41 -0500
Subject: [PATCH] Fix custom token

---
 action.yml  | 3 +--
 src/main.ts | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/action.yml b/action.yml
index 328e3ba..9f038f0 100644
--- a/action.yml
+++ b/action.yml
@@ -46,8 +46,7 @@ inputs:
   append_body:
     description: "Append existed body instead of overrites. Default is false."
     required: false
-env:
-  "GITHUB_TOKEN": "As provided by Github Actions"
+
 outputs:
   url:
     description: "URL to the Release HTML Page"
diff --git a/src/main.ts b/src/main.ts
index dcf9d31..e3bf520 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -6,9 +6,9 @@ import {
   uploadUrl
 } from "./util";
 import { release, upload, GitHubReleaser } from "./github";
+import * as core from "@actions/core";
 import { getOctokit } from "@actions/github";
 import { setFailed, setOutput } from "@actions/core";
-import { GitHub, getOctokitOptions } from "@actions/github/lib/utils";
 
 import { env } from "process";
 
@@ -37,7 +37,7 @@ async function run() {
     //   require("@octokit/plugin-retry")
     // );
 
-    const gh = getOctokit(config.github_token, {
+    const gh = getOctokit(core.getInput('token'), {
       //new oktokit(
       throttle: {
         onRateLimit: (retryAfter, options) => {