gitlab
gitlab copied to clipboard
Documentation improvements.
I think it's a better to make these example uniform, it's really confusing.
semantic-release/gitlab
(this project)
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/gitlab", {
"gitlabUrl": "https://custom.gitlab.com",
"assets": [
{"path": "dist/asset.min.css", "label": "CSS distribution"},
{"path": "dist/asset.min.js", "label": "JS distribution"}
]
}],
]
}
- It's not clear from the above how to publish an angular project, which builds into
dist
hand has many "assets".npm pack
just needs to be told to thedist/
directory that contains thepackage.json
, for examplenpm pack dist/my-workspace/my-lib
. How do we package an angular project with Semantic-Release gitlab like above? - You post a
gitlabUrl
in there. It's not clear why I would ever want that. That can be supported by thepackage.json
. Why would I want it here. For simplicity I would remove it.
GitLab wiki,
The following is from the GitLab wiki,
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/gitlab",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
- Note this has
branches
That seems to be required. If it is this project should probably also contain it.
This seems really sane to me and should be approved
Hi. I created a small PR #366 to start working on this. Feel free to jump on and work on this. I just added the missing configuration for branches
.
Regarding your remarks:
- In your angular example: Do you want to create a NPM package or a zipped dist folder? If you want to create a NPM package hosted in the package registry, I think the documentation for the NPM plugin is more relevant.
- I think the
gitlabUrl
is there to showcase some possibilities which will be explained further down. I agree that most people will not set this property because they will use the CI/CD. Here we use the provided env vars. But if one wants to use the CLI and has a private instance it might be useful to know.
These are just my thoughts. Feel free to add and change the mentioned PR to optimize the documentation 😉