Naturally Produced Modules
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    semantic-release-gitlab-releaserpublic

    semantic-release-gitlab-releaser

    build status codecov

    semantic-release-gitlab plugin that creates a git tag and a GitLab release entry.

    Creates a new GitLab release matching the version of the package being released. When a release is created on GitLab, a git tag is created along with it. Therefore, it's possible to fetch tags from the GitLab repository for every release created.

    The release created on GitLab includes a changelog of all changes introduced in the release. The changelog is created using conventional-changelog, and the format of the changelog is based on the preset value passed to the plugin.

    Table of Contents

    Installation

    To install the semantic-release-gitlab-releaser plugin for use in your own package publishing tool please run the following command:

    yarn add [--dev] semantic-release-gitlab-releaser

    Usage

    semantic-release-gitlab-releaser, when called, returns a promise.

    It takes one parameter, a configuration object, that contains options that alter its behavior, and data needed to generate the changelog.

    const releaser = require(`semantic-release-gitlab-releaser`);
     
    const config = {};
     
    releaser(config)
      .then(() => { /* Return value `true` for successful release, `false` for no release. */ })
      .catch(() => { /* Do any exception handling here. */ });

    Configuration

    The config object passed to semantic-release-gitlab-releaser, as shown in the example above, must have the following properties:

    • pkg
    • options

    pkg

    A copy of the to-be-released project's package.json file. This must include a repository property with the path to the project's git repository on GitLab. Please see npm's documentation on the format of the repository field. The repository field is parsed by git-pkg-repo, supporting many formats, including HTTPS and SSH.

    options

    options is an object with the following properties:

    • debug
    • preset
    • scmToken
    • insecureApi
    debug

    Default: false

    Set to true to enable debug mode. In debug mode all input will be validated, but a release will not be published to GitLab.

    This serves a different purpose than the Debugging section; which simply prints debug messages to the console.

    preset

    Default: angular

    Set to the preferred commit message and changelog format. Once such preset value could be angular, which uses the rules codified in conventional-changelog-angular. The provided preset will be used for extracting information from each commit message based on the format rules established by the preset. Furthermore, the format of the generated chagelog will be based on a template provided by the same preset.

    At this time you cannot parse commit messages using one preset, and generate a changelog using the format of another preset.

    scmToken

    An authentication token with access to the to-be-released project on GitLab so that a GitLab release can be created.

    Authentication Requirements

    The account associated with the authentication token must have Developer permissions on the project so that this plugin may use the Add tags action, as documented on the GitLab Permissions site.

    insecureApi

    Default: undefined

    By default all API calls to GitLab are made over HTTPS. If, for some reason, that's impossible, those API calls can be made over HTTP instead.

    To use HTTP set insecureApi to true.

    We strongly advise against communicating with GitLab over HTTP, but this option is supported for those cases where configuring SSL for GitLab is not feasible.

    Debugging

    To assist users of the semantic-release-gitlab-releaser plugin with debugging the behavior of this module we use the debug utility package to print information about the release process to the console. To enable debug message printing, the environment variable DEBUG, which is the variable used by the debug package, must be set to a value configured by the package containing the debug messages to be printed.

    To print debug messages on a unix system set the environment variable DEBUG with the name of this package prior to executing a tool that invokes this plugin:

    DEBUG=semantic-release-gitlab-releaser [RELEASE TOOL]

    On the Windows command line you may do:

    set DEBUG=semantic-release-gitlab-releaser
    [RELEASE TOOL]

    All semantic-release-gitlab plugins use debug to print information to the console. You can instruct all plugins, and semantic-release-gitlab, to print their debugging information by using semantic-release-gitlab* as the value of the DEBUG environment variable.

    DEBUG=semantic-release-gitlab* [RELEASE TOOL]

    Node Support Policy

    We only support Long-Term Support versions of Node.

    We specifically limit our support to LTS versions of Node, not because this package won't work on other versions, but because we have a limited amount of time, and supporting LTS offers the greatest return on that investment.

    It's possible this package will work correctly on newer versions of Node. It may even be possible to use this package on older versions of Node, though that's more unlikely as we'll make every effort to take advantage of features available in the oldest LTS version we support.

    As each Node LTS version reaches its end-of-life we will remove that version from the node engines property of our package's package.json file. Removing a Node version is considered a breaking change and will entail the publishing of a new major version of this package. We will not accept any requests to support an end-of-life version of Node. Any merge requests or issues supporting an end-of-life version of Node will be closed.

    We will accept code that allows this package to run on newer, non-LTS, versions of Node. Furthermore, we will attempt to ensure our own changes work on the latest version of Node. To help in that commitment, our continuous integration setup runs against all LTS versions of Node in addition the most recent Node release; called current.

    JavaScript package managers should allow you to install this package with any version of Node, with, at most, a warning if your version of Node does not fall within the range specified by our node engines property. If you encounter issues installing this package, please report the issue to your package manager.

    Contributing

    Please read our contributing guide on how you can help improve this project.

    install

    npm i semantic-release-gitlab-releaser

    Downloadslast 7 days

    2,080

    version

    3.0.42

    license

    Apache-2.0

    homepage

    gitlab.com

    repository

    gitlab.com

    last publish

    collaborators

    • avatar