Socket
Socket
Sign inDemoInstall

@semantic-release/github

Package Overview
Dependencies
Maintainers
4
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-release/github - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

12

index.js

@@ -1,3 +0,3 @@

const verifyGithub = require('./lib/verify');
const publishGithub = require('./lib/publish');
const verifyGitHub = require('./lib/verify');
const publishGitHub = require('./lib/publish');

@@ -7,3 +7,3 @@ let verified;

async function verifyConditions(pluginConfig, {options, logger}) {
// If the Github publish plugin is used and has `assets` configured, validate it now in order to prevent any release if the configuration is wrong
// If the GitHub publish plugin is used and has `assets` configured, validate it now in order to prevent any release if the configuration is wrong
if (options.publish) {

@@ -18,3 +18,3 @@ const publishPlugin = (Array.isArray(options.publish) ? options.publish : [options.publish]).find(

await verifyGithub(pluginConfig, options, logger);
await verifyGitHub(pluginConfig, options, logger);
verified = true;

@@ -25,8 +25,8 @@ }

if (!verified) {
await verifyGithub(pluginConfig, options, logger);
await verifyGitHub(pluginConfig, options, logger);
verified = true;
}
await publishGithub(pluginConfig, options, nextRelease, logger);
await publishGitHub(pluginConfig, options, nextRelease, logger);
}
module.exports = {verifyConditions, publish};

@@ -39,3 +39,3 @@ const {basename, extname} = require('path');

const {data: {html_url: htmlUrl, upload_url: uploadUrl}} = await github.repos.createRelease(release);
logger.log('Published Github release: %s', htmlUrl);
logger.log('Published GitHub release: %s', htmlUrl);

@@ -42,0 +42,0 @@ if (assets && assets.length > 0) {

@@ -32,3 +32,3 @@ const {isString, isPlainObject, isUndefined, isArray} = require('lodash');

throw new SemanticReleaseError(
`The git repository URL ${repositoryUrl} is not a valid Github URL.`,
`The git repository URL ${repositoryUrl} is not a valid GitHub URL.`,
'EINVALIDGITURL'

@@ -39,5 +39,5 @@ );

if (githubUrl) {
logger.log('Verify Github authentication (%s)', urlJoin(githubUrl, githubApiPathPrefix));
logger.log('Verify GitHub authentication (%s)', urlJoin(githubUrl, githubApiPathPrefix));
} else {
logger.log('Verify Github authentication');
logger.log('Verify GitHub authentication');
}

@@ -52,3 +52,3 @@

if (err.code === 401) {
throw new SemanticReleaseError('Invalid Github token.', 'EINVALIDGHTOKEN');
throw new SemanticReleaseError('Invalid GitHub token.', 'EINVALIDGHTOKEN');
} else if (err.code === 404) {

@@ -55,0 +55,0 @@ throw new SemanticReleaseError(`The repository ${owner}/${repo} doesn't exist.`, 'EMISSINGREPO');

{
"name": "@semantic-release/github",
"description": "Set of semantic-release plugins for publishing a Github release",
"version": "3.0.0",
"description": "Set of semantic-release plugins for publishing a GitHub release",
"version": "3.0.1",
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",

@@ -6,0 +6,0 @@ "bugs": {

# @semantic-release/github
Set of [semantic-release](https://github.com/semantic-release/semantic-release) plugins for publishing a
[Github release](https://help.github.com/articles/about-releases).
Set of [Semantic-release](https://github.com/semantic-release/semantic-release) plugins for publishing a
[GitHub release](https://help.github.com/articles/about-releases).

@@ -17,13 +17,12 @@ [![Travis](https://img.shields.io/travis/semantic-release/github.svg)](https://travis-ci.org/semantic-release/github)

Publish a [Github release](https://help.github.com/articles/about-releases), optionally uploading files.
Publish a [GitHub release](https://help.github.com/articles/about-releases), optionally uploading files.
## Configuration
### Github Repository authentication
### GitHub authentication
The `Github` authentication configuration is **required** and can be set via
The GitHub authentication configuration is **required** and can be set via
[environment variables](#environment-variables).
Only the [personal token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)
authentication is supported.
Follow the [Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) documentation to obtain an authentication token. The token has to be made available in your CI environment via the `GH_TOKEN` environment variable.

@@ -54,4 +53,4 @@ ### Environment variables

| `path` | **Required.** A [glob](https://github.com/isaacs/node-glob#glob-primer) to identify the files to upload. | - |
| `name` | The name of the downloadable file on the Github release. | File name extracted from the `path`. |
| `label` | Short description of the file displayed on the Github release. | - |
| `name` | The name of the downloadable file on the GitHub release. | File name extracted from the `path`. |
| `label` | Short description of the file displayed on the GitHub release. | - |

@@ -64,3 +63,3 @@ Each entry in the `assets` `Array` is globbed individually. A [glob](https://github.com/isaacs/node-glob#glob-primer)

Files can be included enven if they have a match in `.gitignore`.
Files can be included even if they have a match in `.gitignore`.

@@ -76,11 +75,11 @@ ##### `assets` examples

distribution'}]`: include the `dist/MyLibrary.js` and `dist/MyLibrary.css` files, and label them `MyLibrary JS
distribution` and `MyLibrary CSS distribution` in the Github release.
distribution` and `MyLibrary CSS distribution` in the GitHub release.
`[['dist/**/*.{js,css}', '!**/*.min.*'], {path: 'build/MyLibrary.zip', label: 'MyLibrary'}]`: include all the `js` and
`css` files in the `dist` directory and its sub-directories excluding the minified version, plus the
`build/MyLibrary.zip` file and label it `MyLibrary` in the Github release.
`build/MyLibrary.zip` file and label it `MyLibrary` in the GitHub release.
### Usage
The plugins are used by default by [semantic-release](https://github.com/semantic-release/semantic-release) so no
The plugins are used by default by [Semantic-release](https://github.com/semantic-release/semantic-release) so no
specific configuration is required if `githubUrl` and `githubApiPathPrefix` are set via environment variable.

@@ -100,3 +99,3 @@

Options can be set within the plugin definition in the `semantic-release` configuration file:
Options can be set within the plugin definition in the Semantic-release configuration file:

@@ -103,0 +102,0 @@ ```json

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc