... | ... | @@ -3,9 +3,30 @@ The package is deployed directly to this GitLab, and can be viewed from [Package |
|
|
A pipeline is configured to automatically publish the package if the version number in `package.json` is changed, but can also be triggered manually. You can also publish it from your system without using the pipeline.
|
|
|
|
|
|
# Important note about versioning
|
|
|
To keep the versioning consistent with the original Apollon library [(@ls1intum/apollon)](https://www.npmjs.com/package/@ls1intum/apollon), our fork (@ksu/apollon) should use the same version as @ls1intum/apollon, with a single extension ("`-N`") to track our own releases.
|
|
|
|
|
|
To keep the versioning consistent with the original Apollon library (\[@ls1intum/apollon)(https://www.npmjs.com/package/@ls1intum/apollon)), our fork (@ksu/apollon) should use **the same version as @ls1intum/apollon, with a single extension ("`-N`") to track our own releases**.
|
|
|
|
|
|
For example, if our library is based on version `2.12.4` of @ls1intum/apollon, then our releases should use `2.12.4-1`, `2.12.4-2`, etc.
|
|
|
|
|
|
If we merge version `2.12.6` of @ls1intum/apollon into our repo, then (after making sure our library works) we should release `2.12.6-0`, and future releases can use `2.12.6-1`, `2.12.6-2`, etc.
|
|
|
|
|
|
# Publishing with CI/CD pipeline
|
|
|
|
|
|
**Note: A** [**GitLab Runner**](https://docs.gitlab.com/runner/) **needs to be registered for pipelines to run.**
|
|
|
|
|
|
Right now the pipeline (`.gitlab-ci.yml`) is configured to publish the package any time `package.json` is updated in the `develop` branch, and the version number is changed. You can also manually trigger the pipeline by clicking [CI/CD](https://docs.gitlab.com/runner/) in the sidebar.
|
|
|
|
|
|
# Manually publishing from command-line
|
|
|
|
|
|
1. Make sure the file `.npmrc` contains the following lines:
|
|
|
|
|
|
```properties
|
|
|
@ksu:registry=https://gitlab.cs.ksu.edu/api/v4/projects/1192/packages/npm/
|
|
|
//gitlab.cs.ksu.edu/api/v4/projects/1192/packages/npm/:_authToken="${NPM_TOKEN}"
|
|
|
```
|
|
|
|
|
|
This sets the scope "@ksu" to use the GitLab registry for this project (1192 is the project id).
|
|
|
|
|
|
2. Create a [personal access token](https://gitlab.cs.ksu.edu/-/profile/personal_access_tokens) with the `api` flag set, and copy it.
|
|
|
|
|
|
3. Run `NPM_TOKEN=<your-personal-access-token-here> yarn publish --non-interactive` |
|
|
\ No newline at end of file |