diff --git a/README.md b/README.md index b25db7bb..c474e21f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The plugin can be configured in the [**semantic-release** configuration file](ht "assets": [ {"path": "dist/asset.min.css", "label": "CSS distribution"}, {"path": "dist/asset.min.js", "label": "JS distribution", "type": "generic_package"}, - {"path": "dist/asset.min.js", "label": "v${nextRelease.version}.js"} + {"path": "dist/asset.min.js", "label": "v${nextRelease.version}.js"}, {"url": "https://gitlab.com/gitlab-org/gitlab/-/blob/master/README.md"} ] }] diff --git a/lib/publish.js b/lib/publish.js index d246570b..66c7f9bf 100644 --- a/lib/publish.js +++ b/lib/publish.js @@ -51,6 +51,7 @@ module.exports = async (pluginConfig, context) => { const filepath = asset.filepath ? template(asset.filepath)(context) : undefined; const target = asset.target ? template(asset.target)(context) : undefined; const status = asset.status ? template(asset.status)(context) : undefined; + if (_url) { assetsList.push({label, rawUrl: _url, type, filepath}); debug('use link from release setting: %s', _url); @@ -78,7 +79,7 @@ module.exports = async (pluginConfig, context) => { debug('file target: %o', target); debug('file status: %o', status); - // Uploaded files to the project + // Uploaded assets to the project const form = new FormData(); form.append('file', createReadStream(file));