XS✔ ◾ Bump dotnet-sdk from 10.0.100 to 10.0.101 #2148
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: Build and run unit tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - release | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| pr-metrics: | |
| name: PR Metrics | |
| runs-on: windows-latest | |
| permissions: | |
| pull-requests: write | |
| statuses: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: PR Metrics | |
| uses: microsoft/PR-Metrics@v1.7.7 | |
| env: | |
| PR_METRICS_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest] # [ubuntu-latest, windows-latest, macOS-latest] | |
| configuration: [Release, Debug] | |
| env: | |
| IsReleaseBuild: ${{ matrix.configuration == 'Release' && github.event_name == 'release' && !github.event.release.prerelease && github.ref == 'refs/heads/master' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install .NET 9 SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Install .NET 10 SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Install SF SDK | |
| shell: powershell | |
| run: | | |
| Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser | |
| $ProgressPreference = 'SilentlyContinue' | |
| Invoke-WebRequest -OutFile setup.exe -Uri https://download.microsoft.com/download/b/8/a/b8a2fb98-0ec1-41e5-be98-9d8b5abf7856/MicrosoftServiceFabric.11.2.304.1.exe | |
| .\setup.exe /accepteula /force /quiet /SkipPSExecutionPolicy | |
| - name: Build with dotnet | |
| run: dotnet build --configuration ${{ matrix.configuration }} | |
| - name: Run Unit Tests | |
| run: dotnet test --no-build --configuration ${{ matrix.configuration }} | |
| - name: Create NuGet packages | |
| run: dotnet pack --no-build --configuration ${{ matrix.configuration }} | |
| - name: Add GitHub package source | |
| run: dotnet nuget add source https://nuget.pkg.github.com/microsoft/index.json --name "github" --username NotUsed --password ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish NuGet packages | |
| run: dotnet nuget push nuget\*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate --no-symbols true | |
| if: matrix.configuration == 'Release' && github.event_name == 'release' && github.ref == 'refs/heads/master' |