@semantic-release/github
Advanced tools
Comparing version 2.2.3 to 3.0.0
const {castArray} = require('lodash'); | ||
module.exports = ({githubToken, githubUrl, githubApiPathPrefix, assets}) => ({ | ||
githubToken: githubToken || process.env.GH_TOKEN || process.env.GITHUB_TOKEN, | ||
module.exports = ({githubUrl, githubApiPathPrefix, assets}) => ({ | ||
githubToken: process.env.GH_TOKEN || process.env.GITHUB_TOKEN, | ||
githubUrl: githubUrl || process.env.GH_URL || process.env.GITHUB_URL, | ||
@@ -6,0 +6,0 @@ githubApiPathPrefix: githubApiPathPrefix || process.env.GH_PREFIX || process.env.GITHUB_PREFIX, |
109
package.json
@@ -1,1 +0,108 @@ | ||
{"name":"@semantic-release/github","description":"Set of semantic-release plugins for publishing a Github release","version":"2.2.3","author":"Pierre Vanduynslager (https://twitter.com/@pvdlg_)","bugs":{"url":"https://github.com/semantic-release/github/issues"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"contributors":["Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)","Gregor Martynus (https://twitter.com/gr2m)"],"dependencies":{"@semantic-release/error":"^2.1.0","debug":"^3.1.0","fs-extra":"^5.0.0","github":"^13.0.0","globby":"^7.1.1","lodash":"^4.17.4","mime":"^2.0.3","p-reduce":"^1.0.0","parse-github-url":"^1.0.1","url-join":"^2.0.2"},"devDependencies":{"ava":"^0.24.0","clear-module":"^2.1.0","codecov":"^3.0.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint-config-prettier":"^2.8.0","eslint-plugin-prettier":"^2.3.0","nock":"^9.1.0","nyc":"^11.2.1","prettier":"~1.9.2","semantic-release":"^10.0.0","sinon":"^4.0.0","tempy":"^0.2.1","xo":"^0.18.2"},"engines":{"node":">=4"},"files":["lib","index.js"],"homepage":"https://github.com/semantic-release/github#readme","keywords":["git","github","publish","release","semantic-release","version"],"license":"MIT","main":"index.js","nyc":{"include":["lib/**/*.js","index.js"],"reporter":["json","text","html"],"all":true},"prettier":{"printWidth":120,"singleQuote":true,"bracketSpacing":false,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/semantic-release/github.git"},"scripts":{"cm":"git-cz","codecov":"codecov -f coverage/coverage-final.json","lint":"xo","pretest":"npm run lint","semantic-release":"semantic-release","test":"nyc ava -v"},"xo":{"extends":["prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":2}}} | ||
{ | ||
"name": "@semantic-release/github", | ||
"description": "Set of semantic-release plugins for publishing a Github release", | ||
"version": "3.0.0", | ||
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)", | ||
"bugs": { | ||
"url": "https://github.com/semantic-release/github/issues" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
} | ||
}, | ||
"contributors": [ | ||
"Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)", | ||
"Gregor Martynus (https://twitter.com/gr2m)" | ||
], | ||
"dependencies": { | ||
"@semantic-release/error": "^2.1.0", | ||
"debug": "^3.1.0", | ||
"fs-extra": "^5.0.0", | ||
"github": "^13.0.0", | ||
"globby": "^7.1.1", | ||
"lodash": "^4.17.4", | ||
"mime": "^2.0.3", | ||
"p-reduce": "^1.0.0", | ||
"parse-github-url": "^1.0.1", | ||
"url-join": "^2.0.2" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.24.0", | ||
"clear-module": "^2.1.0", | ||
"codecov": "^3.0.0", | ||
"commitizen": "^2.9.6", | ||
"cz-conventional-changelog": "^2.0.0", | ||
"eslint-config-prettier": "^2.8.0", | ||
"eslint-plugin-prettier": "^2.3.0", | ||
"nock": "^9.1.0", | ||
"nyc": "^11.2.1", | ||
"prettier": "~1.9.2", | ||
"semantic-release": "^11.0.2", | ||
"sinon": "^4.0.0", | ||
"tempy": "^0.2.1", | ||
"xo": "^0.18.2" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"files": [ | ||
"lib", | ||
"index.js" | ||
], | ||
"homepage": "https://github.com/semantic-release/github#readme", | ||
"keywords": [ | ||
"git", | ||
"github", | ||
"publish", | ||
"release", | ||
"semantic-release", | ||
"version" | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"nyc": { | ||
"include": [ | ||
"lib/**/*.js", | ||
"index.js" | ||
], | ||
"reporter": [ | ||
"json", | ||
"text", | ||
"html" | ||
], | ||
"all": true | ||
}, | ||
"prettier": { | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"bracketSpacing": false, | ||
"trailingComma": "es5" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/semantic-release/github.git" | ||
}, | ||
"scripts": { | ||
"cm": "git-cz", | ||
"codecov": "codecov -f coverage/coverage-final.json", | ||
"lint": "xo", | ||
"pretest": "npm run lint", | ||
"semantic-release": "semantic-release", | ||
"test": "nyc ava -v" | ||
}, | ||
"xo": { | ||
"extends": [ | ||
"prettier" | ||
], | ||
"plugins": [ | ||
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": 2 | ||
} | ||
} | ||
} |
# @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). | ||
@@ -11,7 +12,8 @@ [![Travis](https://img.shields.io/travis/semantic-release/github.svg)](https://travis-ci.org/semantic-release/github) | ||
Verify the presence and the validity of the `githubToken` (set via option or environment variable) and the `assets` option configuration. | ||
Verify the presence and the validity of the authentication (set via [environment variables](#environment-variables)) and | ||
the [assets](#assets) option configuration. | ||
## publish | ||
Publish a [Github release](https://help.github.com/articles/about-releases), optionnaly uploading files. | ||
Publish a [Github release](https://help.github.com/articles/about-releases), optionally uploading files. | ||
@@ -22,5 +24,7 @@ ## Configuration | ||
The `Github` authentication configuration is **required** and can be set via [environment variables](#environment-variables). | ||
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. | ||
Only the [personal token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) | ||
authentication is supported. | ||
@@ -30,3 +34,3 @@ ### Environment variables | ||
| Variable | Description | | ||
| ------------------------------ | ----------------------------------------------------------| | ||
| ------------------------------ | --------------------------------------------------------- | | ||
| `GH_TOKEN` or `GITHUB_TOKEN` | **Required.** The token used to authenticate with GitHub. | | ||
@@ -40,3 +44,2 @@ | `GH_URL` or `GITHUB_URL` | The GitHub Enterprise endpoint. | | ||
| --------------------- | ------------------------------------------------------------------ | ---------------------------------------------------- | | ||
| `githubToken` | **Required.** The token used to authenticate with GitHub. | `GH_TOKEN` or `GITHUB_TOKEN` environment variable. | | ||
| `githubUrl` | The GitHub Enterprise endpoint. | `GH_URL` or `GITHUB_URL` environment variable. | | ||
@@ -48,3 +51,4 @@ | `githubApiPathPrefix` | The GitHub Enterprise API prefix. | `GH_PREFIX` or `GITHUB_PREFIX` environment variable. | | ||
Can be a [glob](https://github.com/isaacs/node-glob#glob-primer) or and `Array` of [globs](https://github.com/isaacs/node-glob#glob-primer) and `Object`s with the following properties | ||
Can be a [glob](https://github.com/isaacs/node-glob#glob-primer) or and `Array` of | ||
[globs](https://github.com/isaacs/node-glob#glob-primer) and `Object`s with the following properties | ||
@@ -57,3 +61,5 @@ | Property | Description | Default | | ||
Each entry in the `assets` `Array` is globbed individually. A [glob](https://github.com/isaacs/node-glob#glob-primer) can be a `String` (`"dist/**/*.js"` or `"dist/mylib.js"`) or an `Array` of `String`s that will be globbed together (`["dist/**", "!**/*.css"]`). | ||
Each entry in the `assets` `Array` is globbed individually. A [glob](https://github.com/isaacs/node-glob#glob-primer) | ||
can be a `String` (`"dist/**/*.js"` or `"dist/mylib.js"`) or an `Array` of `String`s that will be globbed together | ||
(`["dist/**", "!**/*.css"]`). | ||
@@ -68,11 +74,17 @@ If a directory is configured, all the files under this directory and its children will be included. | ||
`[['dist', '!**/*.css']]`: include all the files in the `dist` directory and its sub-directories excluding the `css` files. | ||
`[['dist', '!**/*.css']]`: include all the files in the `dist` directory and its sub-directories excluding the `css` | ||
files. | ||
`[{path: 'dist/MyLibrary.js', label: 'MyLibrary JS distribution'}, {path: 'dist/MyLibrary.css', label: 'MyLibrary CSS 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. | ||
`[{path: 'dist/MyLibrary.js', label: 'MyLibrary JS distribution'}, {path: 'dist/MyLibrary.css', label: 'MyLibrary CSS | ||
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. | ||
`[['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. | ||
`[['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. | ||
### Usage | ||
The plugins are used by default by [semantic-release](https://github.com/semantic-release/semantic-release) so no specific configuration is requiered if `githubToken`, `githubUrl` and `githubApiPathPrefix` are set via environment variable. | ||
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. | ||
@@ -79,0 +91,0 @@ Each individual plugin can be disabled, replaced or used with other plugins in the `package.json`: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19194
125