gitlab icon indicating copy to clipboard operation
gitlab copied to clipboard

Documentation improvements.

Open EvanCarroll opened this issue 3 years ago • 2 comments

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"}
      ]
    }],
  ]
}
  1. 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 the dist/ directory that contains the package.json, for example npm pack dist/my-workspace/my-lib. How do we package an angular project with Semantic-Release gitlab like above?
  2. You post a gitlabUrl in there. It's not clear why I would ever want that. That can be supported by the package.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}"
      }
    ]
  ]
}
  1. Note this has branches That seems to be required. If it is this project should probably also contain it.

EvanCarroll avatar Jul 22 '21 16:07 EvanCarroll

This seems really sane to me and should be approved

triwats avatar Sep 20 '21 17:09 triwats

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:

  1. 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.
  2. 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 😉

JonasSchubert avatar Apr 16 '22 16:04 JonasSchubert