fix: check for npm token early

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

View File

@ -15,6 +15,7 @@ const event = JSON.parse(fs.readFileSync('/github/workflow/event.json').toString
let pkg = require(path.join(process.cwd(), 'package.json')) let pkg = require(path.join(process.cwd(), 'package.json'))
const run = async () => { const run = async () => {
if (!process.env.NPM_TOKEN) throw new Error('Merge-release requires NPM_TOKEN')
let latest let latest
try { try {
latest = await get(pkg.name + '/latest') latest = await get(pkg.name + '/latest')