You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`githubToken`|**Required.** The token used to authenticate with GitHub. |`GH_TOKEN` or `GITHUB_TOKEN` environment variable.|
38
+
|`githubUrl`| The GitHub Enterprise endpoint. |`GH_URL` or `GITHUB_URL` environment variable.|
39
+
|`githubApiPathPrefix`| The GitHub Enterprise API prefix. |`GH_PREFIX` or `GITHUB_PREFIX` environment variable.|
40
+
|`assets`| An array of files to upload to the release. See [assets](#assets). | -|
33
41
34
-
#### assets option
42
+
#### `assets`
35
43
36
-
Each element of the array can be a path to the file or an `object` with the properties:
44
+
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
|`path`|**Required.**A [glob](https://github.com/isaacs/node-glob#glob-primer)to identify the files to upload. | - |
49
+
|`name`| The name of the downloadable file on the Github release. | File name extracted from the `path`. |
50
+
|`label`| Short description of the file displayed on the Github release. | - |
43
51
44
-
## Configuration
52
+
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"]`).
53
+
54
+
If a directory is configured, all the files under this directory and its children will be included.
55
+
56
+
Files can be included enven if they have a match in `.gitignore`.
57
+
58
+
##### `assets` examples
59
+
60
+
`'dist/*.js'`: include all the `js` files in the `dist` directory, but not in its sub-directories.
61
+
62
+
`[['dist', '!**/*.css']]`: include all the files in the `dist` directory and its sub-directories excluding the `css` files.
63
+
64
+
`[{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.
65
+
66
+
`[['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.
67
+
68
+
### Usage
45
69
46
70
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.
47
71
48
72
Each individual plugin can be disabled, replaced or used with other plugins in the `package.json`:
// Make requests serially to avoid hitting the rate limit (https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)
0 commit comments