add nuget updates #13
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: NET | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
BuildConfig: Release | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_VERSION: '7.0.306' # https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json | |
SOLUTION_FILE: 'BenjaminAbt.AspDemoPlatform.sln' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous builds in PR | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: 'Install .NET SDK' | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: .NET Restore | |
run: dotnet restore --configfile NuGet.config | |
- name: .NET Tool Restore | |
run: dotnet tool restore | |
- name: Versioning | |
uses: dotnet/nbgv@master | |
id: nbgv | |
- name: Version Info | |
run: | | |
echo 'SemVer2: ${{ steps.nbgv.outputs.SemVer2 }}' | |
- name: Build with dotnet | |
run: dotnet build $(SOLUTION_FILE) -c Release --no-restore | |
- name: Build Database Tenants | |
run: dotnet build src/Features.Tenants.Database.SqlServer.Migrations/Features.Tenants.Database.SqlServer.Migrations.csproj -c Release --no-restore | |
- name: Test with dotnet | |
run: dotnet test -c Release --no-restore --no-build /p:CollectCoverage=true |