NPM Package - GitLab
Overview
The NPM Package - GitLab template automates NPM package creation and publishing. It uses "npm pack" to generate the package, includes placeholder steps for scan, and test cases. The script dynamically extracts the patch version from a .NET project using "dotnet-gitversion" for version consistency. It then configures the NPM registry URL and authentication token for GitLab, ensuring a smooth package publishing process to the specified repository.
Input Variables
Input Variable Name | Description | Default Values | Type | Supported Values |
---|---|---|---|---|
pipeline_number_prefix | Prefix for the pipeline number. | ${version_prefix} | string | |
pre_release_tag | Pre-release tag to append to the package version. | alpha | string | |
gl_package_token | GitLab package token for authentication. | myGitLabToken | string | |
gl_package_username | GitLab package username for authentication. | myGitLabUser | string | |
gl_package_path | Path to the GitLab package repository. | https://gitlab.example.com/api/packages/nuget/index.json | string | |
version_prefix | Prefix for the package version. | 1.0 | string | |
gl_url | GitLab instance URL. | gitlab.com | string | |
gl_token | GitLab personal access token for authentication. | myPersonalAccessToken | string | |
gl_username | GitLab username for authentication. | myGitLabUser | string | |
gl_projectid | GitLab project ID for the NuGet package repository. | 123456 | number | |
app_name | Name of the application. | myapplication | string |