Install and setup the Mister.Version CLI tool for semantic versioning in monorepos.
This action handles the installation and configuration of the Mister.Version CLI tool, ensuring it's available for subsequent versioning operations in your workflow. The tool is installed globally via dotnet tool install.
- uses: mr-version/setup@v1
with:
version: 'latest'
dotnet-version: '8.0.x'| Input | Description | Required | Default |
|---|---|---|---|
version |
Version of Mister.Version to install (latest, specific version like 1.0.0, or local path) | No | latest |
dotnet-version |
.NET SDK version to use | No | 8.0.x |
cache |
Enable caching of the tool installation | No | true |
token |
GitHub token for downloading releases | No | ${{ github.token }} |
| Output | Description |
|---|---|
tool-path |
Path to the installed mr-version tool |
cache-hit |
Whether the tool was restored from cache |
version |
Actual version of the tool that was installed |
steps:
- uses: actions/checkout@v4
- uses: mr-version/setup@v1steps:
- uses: actions/checkout@v4
- uses: mr-version/setup@v1
with:
version: '1.1.0-rc.12' # Specific version
dotnet-version: '8.0.x'steps:
- uses: actions/checkout@v4
- uses: mr-version/setup@v1
with:
version: './mister.version/nupkg/Mister.Version.CLI.1.1.0-rc.15.nupkg'
cache: 'false'strategy:
matrix:
dotnet: ['6.0.x', '7.0.x', '8.0.x']
steps:
- uses: actions/checkout@v4
- uses: mr-version/setup@v1
with:
dotnet-version: ${{ matrix.dotnet }}The action automatically caches the tool installation to speed up subsequent runs. The cache key is based on:
- Operating system
- .NET SDK version
- Mister.Version tool version
To disable caching:
- uses: mr-version/setup@v1
with:
cache: 'false'The version input accepts:
latest- Installs the latest stable release from NuGet1.1.0- Installs a specific version1.1.0-rc.15- Installs a prerelease version./path/to/nupkg- Uses a local NuGet package path (useful for testing)
This action requires:
- A GitHub-hosted or self-hosted runner
- Network access to GitHub releases (unless using local path)
If the tool isn't found after installation:
- Check the
tool-pathoutput - Ensure the .NET SDK version is compatible
- Verify network access to GitHub
To force a fresh installation:
- uses: mr-version/setup@v1
with:
cache: 'false'Ensure the runner has write permissions to the tool installation directory.
This action is part of the Mister.Version project and is licensed under the MIT License.