semantic-release-gitlab-publish
v1.0.0
Published
Sharable configuration for semantic-release, extends experience for publishing to NPM & Gitlab registry: generates release-notes, changelog, publishes new version.
Downloads
11
Maintainers
Readme
semantic-release-gitlab-publish
semantic-release shareable config to publish npm packages with Gitlab.
Plugins
This shareable configuration uses the following plugins:
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/changelog
@semantic-release/gitlab
@semantic-release/npm
@semantic-release/git
Summary
- Provides an informative git commit message for the release commit that does not trigger continuous integration and conforms to the conventional commits specification (e.g., "chore(release): 1.2.3 [skip ci]").
- Produce a release note release-notes-generator.
- Creates a tarball that gets uploaded with each Gitlab release.
- Publishes the same tarball to Gitlab registry.
- Commits the version change in
package.json
. - Creates or updates a changelog file in the docs directory.
Install
$ npm install --save-dev semantic-release semantic-release-gitlab-publish
Usage
The shareable config can be configured in the semantic-release configuration file:
{
"extends": "semantic-release-gitlab-publish",
"branch": "main",
"preset": "angular"
}
Configuration
Ensure that your CI configuration has the following secret environment variables set:
GL_TOKEN
withapi
andwrite_repository
scopes as mention in the
See the documentation for required installation and configuration steps.
Gitlab CI configuration
Here is an example of what your gitlab-ci.yaml publish
job should look like:
name: CICD
stages:
- publish
.base:
image: node:16
publish:
stage: publish
extends:
- .base
environment:
name: PROD
only:
- main
script:
- npx semantic-release