Feature/case insensitive less allocations #93
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: ["main"] | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore --locked-mode | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Test | |
run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura | |
- name: Pack prerelease | |
if: "!startsWith(github.ref, 'refs/tags/v')" | |
run: dotnet pack -c Release --no-build --version-suffix build.${{github.run_number}} | |
- name: Pack release | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
run: | | |
TAG=${{github.ref_name}} | |
VERSION=${TAG#v} | |
dotnet pack -c Release --no-build -p:PackageVersion=$VERSION | |
- name: Upload nuget package | |
if: (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') || startsWith(github.ref, 'refs/tags/v') | |
uses: actions/[email protected] | |
with: | |
name: nugetpackage | |
path: ./**/*.nupkg | |
Push: | |
needs: Build | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Download artifacts | |
uses: actions/[email protected] | |
- name: Pack release | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
run: | | |
TAG=${{github.ref_name}} | |
VERSION=${TAG#v} | |
dotnet nuget push ./nugetpackage/FuzzySearchNet/bin/Release/FuzzySearch.Net.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_PAT} | |
env: | |
NUGET_PAT: ${{ secrets.NUGET_PAT }} |