NPM publishing bot
We currently have 2 npm packages published gitlab-svgs and csslab. Whenever new changes are made, maintainers currently have to manually publish the package to npm, increment the version in it's repo and upgrade the version used in CE/EE. It would be ideal to take advantage of GitLab to streamline this process.
Create a manual CI pipeline that automatically
- updates the version number of the npm package
- publishes to npm
- updates the corresponding npm version on GitLab CE/EE (in a MR)
We can take advantage of our existing https://gitlab.com/gitlab-bot to run the job on gitlab.com and create a service desk email for a npm user (that does all the publishing from the npm side).
Manual pipeline can only be triggered by a user with
masterprivileges. Should we still require maintainers to trigger the pipeline? Or should we encourage team members to login as the bot to run the manual job? The downside is there wouldn't be a clear way to determine who ran the job.
We could consider automatically publishing after each MR is merged. This would automate without requiring a manual pipeline but I don't think this is a good solution as it would create an abundance of package versions.
Should the bot auto merge the package changes to both csslab/gitlab-svgs and CE/EE? The advantages for this is that the user or maintainer does not need to do multiple actions to publish a package. A one click publishing would automatically update multiple repos.
If we were to follow semver (which I think we should), should we increase the minor or patch version numbers?