remove github authentication since it's not needed to access published release assets on gh
This commit is contained in:
parent
511bd84ece
commit
cc2edba049
2 changed files with 1 additions and 10 deletions
|
@ -1,2 +0,0 @@
|
|||
# .env.example committed to repo
|
||||
GITHUB_TOKEN=
|
|
@ -1,5 +1,3 @@
|
|||
require('dotenv-safe').load()
|
||||
|
||||
const temp = require('temp')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
@ -14,10 +12,6 @@ const github = new GitHubApi({
|
|||
headers: { 'User-Agent': 'electron-npm-publisher' },
|
||||
followRedirects: false
|
||||
})
|
||||
github.authenticate({
|
||||
type: 'token',
|
||||
token: process.env.GITHUB_TOKEN
|
||||
})
|
||||
|
||||
let tempDir
|
||||
temp.track() // track and cleanup files at exit
|
||||
|
@ -95,8 +89,7 @@ new Promise((resolve, reject) => {
|
|||
url: tsdAsset.url,
|
||||
headers: {
|
||||
'accept': 'application/octet-stream',
|
||||
'user-agent': 'electron-npm-publisher',
|
||||
Authorization: `token ${process.env.GITHUB_TOKEN}`
|
||||
'user-agent': 'electron-npm-publisher'
|
||||
}
|
||||
}, (err, response, body) => {
|
||||
if (err) {
|
||||
|
|
Loading…
Add table
Reference in a new issue