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 temp = require('temp')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
@ -14,10 +12,6 @@ const github = new GitHubApi({
|
||||||
headers: { 'User-Agent': 'electron-npm-publisher' },
|
headers: { 'User-Agent': 'electron-npm-publisher' },
|
||||||
followRedirects: false
|
followRedirects: false
|
||||||
})
|
})
|
||||||
github.authenticate({
|
|
||||||
type: 'token',
|
|
||||||
token: process.env.GITHUB_TOKEN
|
|
||||||
})
|
|
||||||
|
|
||||||
let tempDir
|
let tempDir
|
||||||
temp.track() // track and cleanup files at exit
|
temp.track() // track and cleanup files at exit
|
||||||
|
@ -95,8 +89,7 @@ new Promise((resolve, reject) => {
|
||||||
url: tsdAsset.url,
|
url: tsdAsset.url,
|
||||||
headers: {
|
headers: {
|
||||||
'accept': 'application/octet-stream',
|
'accept': 'application/octet-stream',
|
||||||
'user-agent': 'electron-npm-publisher',
|
'user-agent': 'electron-npm-publisher'
|
||||||
Authorization: `token ${process.env.GITHUB_TOKEN}`
|
|
||||||
}
|
}
|
||||||
}, (err, response, body) => {
|
}, (err, response, body) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue