feat: add documentation for automatic publishing

Since the workflow is already implemented and working but not
concisely documented and known by everyone who has the
appropriate rights we need a documentation for it so that the
aforementioned persons are able to create new NPM packages
by correctly making use of the GitLab CI job.

Fixes #23
This commit is contained in:
Karl-Philipp Wulfert
2019-11-14 12:13:57 +01:00
parent c598b12014
commit ab45e35117

View File

@@ -0,0 +1,37 @@
# Publishing
## NPM
All projects that use the [OpenStApps configuration](https://gitlab.com/openstapps/configuration) and implement the automatic publishing via GitLab CI can simply be published to the NPM registry by using the appropriate job. It uses the `NPM_AUTH_TOKEN` that is a [protected variable](https://gitlab.com/groups/openstapps/-/settings/ci_cd) of the OpenStApps group. To trigger this job, a new tag has to be created (on the master branch):
### Use current [master branch](BRANCHING.md):
```shell
git checkout master
git pull
```
### Update [version](VERSIONING.md)
```shell
npm version (major|minor|patch)
```
After these steps there should 2 new commits:
* A version commit
* A changelog commit
Also a new git tag should be created.
**CAUTION: Make sure that everything was successful, before running the next command, that pushes commits to GitLab!**
### Pushing commits and version tag created in previous step
To push the previously created commits and version tag you can use the following convenience script:
```shell
npm run push
```
After you've pushed the commits and tags a pipeline will be started for the tag that includes a job that will automatically publish a new package to the NPM registry.