chore: Spice86 v15.0.0 major NuGet release + auto prerelease NuGet on… #591
This file contains hidden or 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: Test and Publish NuGet | |
| # Trigger the workflow on push to master | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [macos-latest, windows-latest, ubuntu-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Test with dotnet | |
| working-directory: ./src | |
| run: dotnet test --configuration Release | |
| - name: Package NuGet | |
| working-directory: ./src | |
| run: dotnet pack --include-symbols --include-source --configuration Release -p:NoWarn=NU5104 | |
| - name: Upload NuGet Spice86.Shared | |
| if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' | |
| working-directory: ./src/Spice86.Shared/bin/Release | |
| run: dotnet nuget push Spice86.Shared.*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate | |
| - name: Upload NuGet Spice86.Storage.Cd | |
| if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' | |
| working-directory: ./src/Spice86.Storage.Cd/bin/Release | |
| run: dotnet nuget push Spice86.Storage.Cd.*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate | |
| - name: Upload NuGet Spice86.Storage.Fat | |
| if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' | |
| working-directory: ./src/Spice86.Storage.Fat/bin/Release | |
| run: dotnet nuget push Spice86.Storage.Fat.*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate | |
| - name: Upload NuGet Spice86.Logging | |
| if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' | |
| working-directory: ./src/Spice86.Logging/bin/Release | |
| run: dotnet nuget push Spice86.Logging.*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate | |
| - name: Upload NuGet Spice86.Core | |
| if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' | |
| working-directory: ./src/Spice86.Core/bin/Release | |
| run: dotnet nuget push Spice86.Core.*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate | |
| - name: Upload NuGet Spice86 | |
| if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' | |
| working-directory: ./src/Spice86/bin/Release | |
| run: dotnet nuget push Spice86.*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate |