Skip to content

workflows...

workflows... #4

Workflow file for this run

name: build-windows
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
dotnet-version: [ '6.0.x', '7.0.x', '8.0.x' ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore src/ManagedObjectSize.sln
- name: Build
run: dotnet build --no-restore --configuration ${{matrix.configuration}} src/ManagedObjectSize.sln
- name: Test
run: dotnet test --no-build --configuration ${{matrix.configuration}} --verbosity normal src/ManagedObjectSize.Tests/ManagedObjectSize.Tests.csproj
- if: ${{ matrix.dotnet-version == '8.0.x' && matrix.configuration == 'Release' }}
name: Publish
run: dotnet nuget push -k ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols src\ManagedObjectSize\bin\Release\ManagedObjectSize*.nupkg
run: dotnet nuget push -k ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols src\ManagedObjectSize.ObjectSize\bin\Release\ManagedObjectSize.ObjectPool*.nupkg

Check failure on line 36 in .github/workflows/build-windows.yml

View workflow run for this annotation

GitHub Actions / build-windows

Invalid workflow file

The workflow is not valid. .github/workflows/build-windows.yml (Line: 36, Col: 7): 'run' is already defined