fix github actions for nuget upload #62
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 Core | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
8.0 | |
6.0.102 | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Upload Build Fail Artifacts | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: build-fail-artifact | |
path: ${{ github.workspace }} | |
- name: Test | |
run: dotnet test --no-restore | |
- name: Upload Test Fail Artifacts | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: test-fail-artifact | |
path: ${{ github.workspace }} |