Backup Restore #188
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4.0.0 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
deploy: | |
runs-on: windows-latest | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4.0.0 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2.0.0 | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: PublishNuget | |
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.PUBLISH_TO_NUGET }} --skip-duplicate |