fix: check correct token var, don’t catch errors so status code is correct

This commit is contained in:
Mikeal Rogers 2019-09-05 15:32:23 -07:00 committed by GitHub
parent 04b5ec4a33
commit a85a535486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ const event = JSON.parse(fs.readFileSync('/github/workflow/event.json').toString
let pkg = require(path.join(process.cwd(), 'package.json'))
const run = async () => {
if (!process.env.NPM_TOKEN) throw new Error('Merge-release requires NPM_TOKEN')
if (!process.env.NPM_AUTH_TOKEN) throw new Error('Merge-release requires NPM_AUTH_TOKEN')
let latest
try {
latest = await get(pkg.name + '/latest')
@ -53,4 +53,4 @@ const run = async () => {
process.stdout.write(execSync(`npm publish --access=public`))
process.stdout.write(execSync(`git checkout package.json`))
}
run().catch(console.error)
run()