1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/scripts/trigger-release.js
Ayush Sharma 4efbad1ef7 Npm publish using GitHub actions (#1275)
* chore: bumps verdaccio-htpasswd@2.0.0

* chore: removes circle ci and publish using github-actions

* chore: adds bash doctype

* chore: adds build and test workflow

* chore: fixes coverage error

* chore: adds e2e tests

* chore: adds headless arg

* chore: sets puppeteer in docker env

* chore: runs tets through bash

* chore: minor fixes
2019-04-17 07:17:39 +02:00

32 lines
624 B
JavaScript

/**
* @prettier
*/
'use strict';
const [, , /* node */ /* file */ tag] = process.argv;
const getStdin = require('get-stdin');
const Octokit = require('@octokit/rest');
const octokit = new Octokit({
auth: `token ${process.env.GITHUB_TOKEN}`,
});
const [repoOwner, repoName] = process.env.GITHUB_REPOSITORY.split('/');
getStdin()
.then(changelog =>
octokit.repos.createRelease({
owner: repoOwner,
repo: repoName,
tag_name: tag,
body: changelog,
draft: true,
})
)
.catch(err => {
// eslint-disable-next-line no-console
console.error(err);
process.exit(1);
});