Skip to main content

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 NameDescriptionDefault ValuesTypeSupported Values
pipeline_number_prefixPrefix for the pipeline number.${version_prefix}string
pre_release_tagPre-release tag to append to the package version.alphastring
gl_package_tokenGitLab package token for authentication.myGitLabTokenstring
gl_package_usernameGitLab package username for authentication.myGitLabUserstring
gl_package_pathPath to the GitLab package repository.https://gitlab.example.com/api/packages/nuget/index.jsonstring
version_prefixPrefix for the package version.1.0string
gl_urlGitLab instance URL.gitlab.comstring
gl_tokenGitLab personal access token for authentication.myPersonalAccessTokenstring
gl_usernameGitLab username for authentication.myGitLabUserstring
gl_projectidGitLab project ID for the NuGet package repository.123456number
app_nameName of the application.myapplicationstring