pre-release-test

1.0.1-alpha.1 • Public • Published

semantic-release-npm

Semantic Release Badge GitLab Pipeline Status

An example project that uses semantic-release to automate the publishing of NPM packages to GitLab's Package Registry.

See the auto-generated releases on the Releases page and the auto-published NPM packages on the Packages page.

A step-by-step guide can be found in GitLab's CI/CD examples documentation.

Environment variables

As part of publishing a package, semantic-release bumps the version in package.json. To allow it to commit this change and push it back to GitLab, the pipeline requires a custom environment variable named GITLAB_TOKEN, a project access token with api scope. This token can be generated by navigating to Project > Settings > Access Tokens. Be sure to mask this variable (otherwise it may be printed in plaintext in the job output).

Consuming the example module

To use this example module in another project, add the following to the project's .npmrc:

@gitlab-examples:registry=https://gitlab.com/api/v4/packages/npm/

Or, if using Yarn, add this to the project's .yarnrc

"@gitlab-examples:registry" "https://gitlab.com/api/v4/packages/npm/"

Then, install the package:

npm install --save @gitlab-examples/semantic-release-npm

or:

yarn add @gitlab-examples/semantic-release-npm

Package Sidebar

Install

npm i pre-release-test

Weekly Downloads

0

Version

1.0.1-alpha.1

License

MIT

Unpacked Size

6.85 kB

Total Files

5

Last publish

Collaborators

  • superman66