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
Copy file name to clipboardExpand all lines: README.md
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
|`verifyConditions`| Verify the presence and the validity of the authentication (set via [environment variables](#environment-variables)) and the [assets](#assets) option configuration. |
16
16
|`publish`| Publish a [GitHub release](https://help.github.com/articles/about-releases), optionally uploading file assets. |
17
17
|`success`| Add a comment to each [GitHub Issue](https://help.github.com/articles/about-issues) or [Pull Request](https://help.github.com/articles/about-pull-requests) resolved by the release and close issues previously open by the `fail` step. |
18
-
|`fail`| Open or update a [GitHub Issue](https://help.github.com/articles/about-issues) with information about the errors that caused the release to fail. |
18
+
|`fail`| Open or update a [GitHub Issue](https://help.github.com/articles/about-issues) with information about the errors that caused the release to fail. |
19
19
20
20
## Install
21
21
@@ -115,6 +115,15 @@ can be a `String` (`"dist/**/*.js"` or `"dist/mylib.js"`) or an `Array` of `Stri
115
115
116
116
If a directory is configured, all the files under this directory and its children will be included.
117
117
118
+
The `name` and `label` for each assets are generated with [Lodash template](https://lodash.com/docs#template). The following variables are available:
|`branch`| The branch from which the release is done. |
123
+
|`lastRelease`|`Object` with `version`, `gitTag` and `gitHead` of the last release. |
124
+
|`nextRelease`|`Object` with `version`, `gitTag`, `gitHead` and `notes` of the release being done. |
125
+
|`commits`|`Array` of commit `Object`s with `hash`, `subject`, `body``message` and `author`. |
126
+
118
127
**Note**: If a file has a match in `assets` it will be included even if it also has a match in `.gitignore`.
119
128
120
129
##### assets examples
@@ -132,6 +141,10 @@ distribution` and `MyLibrary CSS distribution` in the GitHub release.
132
141
`css` files in the `dist` directory and its sub-directories excluding the minified version, plus the
133
142
`build/MyLibrary.zip` file and label it `MyLibrary` in the GitHub release.
134
143
144
+
`[{path: 'dist/MyLibrary.js', name: 'MyLibrary-${nextRelease.gitTag}.js', label: 'MyLibrary JS (${nextRelease.gitTag}) distribution'}]`: include the file `dist/MyLibrary.js` and upload it to the GitHub release with name `MyLibrary-v1.0.0.js` and label `MyLibrary JS (v1.0.0) distribution` which will generate the link:
|`branch`| The branch from which the release had failed. |
161
174
|`errors`| An `Array` of [SemanticReleaseError](https://github.com/semantic-release/error). Each error has the `message`, `code`, `pluginName` and `details` properties.<br>`pluginName` contains the package name of the plugin that threw the error.<br>`details` contains a information about the error formatted in markdown. |
0 commit comments