Use Func to pass custom exception to Guard methods (#350) #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish Ardalis.GuardClauses to nuget | |
on: | |
push: | |
branches: | |
- main # Your default release branch | |
paths: | |
- 'src/GuardClauses/**' | |
jobs: | |
publish: | |
name: list Ardalis.GuardClauses on nuget.org | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest | |
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
# Publish | |
- name: publish on version change | |
uses: rohith/publish-nuget@v2 | |
with: | |
PROJECT_FILE_PATH: src/GuardClauses/GuardClauses.csproj # Relative to repository root | |
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file | |
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group | |
TAG_COMMIT: true # Flag to enable / disable git tagging | |
TAG_FORMAT: GuardClauses-v* # Format of the git tag, [*] gets replaced with version | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key |