NuGet Package - GitLab
Overview
The NuGet Package - GitLab template streamlines the NuGet package creation and publishing process. It identifies and builds projects in their .csproj files. The script includes a placeholder scan and test execution. During the packaging phase, it dynamically determines the patch version using "dotnet-gitversion" for version consistency, sets the package version accordingly, and publishes the NuGet package to the specified GitLab repository. The template ensures smooth integration of versioning and packaging into the GitLab CI/CD workflow.
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 |