Bump Microsoft.SourceLink.GitHub from 10.0.301 to 10.0.400 #333
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 Release | |
| on: [push] | |
| jobs: | |
| build: | |
| name: Create Release | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v7 | |
| - name: Setup .NET 9.0.x | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Dotnet Build | |
| run: dotnet build -c Release | |
| - name: Restore .NET Tools | |
| run: dotnet tool restore | |
| - name: Coverage All Tests | |
| run: dotnet dotcover test --dcXML=Configuration.xml | |
| - name: Save DateTimeOnly Packages | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: packages | |
| path: | | |
| DateTimeOnly/bin/Release/*.nupkg | |
| DateTimeOnly/bin/Release/*.snupkg | |
| - name: Save DateTimeOnly.Json Packages | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: packages-json | |
| path: | | |
| DateTimeOnly.Json/bin/Release/*.nupkg | |
| DateTimeOnly.Json/bin/Release/*.snupkg | |
| publish-main: | |
| name: Publish Binaries | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.repository == 'OlegRa/System.DateTimeOnly' && startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write # needed by softprops/action-gh-release to create the GitHub Release | |
| id-token: write # needed to request the OIDC token for NuGet Trusted Publishing | |
| steps: | |
| - name: Load Packages | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: packages | |
| - name: NuGet login (OIDC -> temporary API key) | |
| uses: NuGet/login@v1 | |
| id: nuget-login | |
| with: | |
| user: ${{ secrets.NUGET_USER }} | |
| - name: Push to NuGet | |
| run: dotnet nuget push **.nupkg -s https://api.nuget.org/v3/index.json -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| name: Release ${{ github.ref }} | |
| draft: true | |
| publish-json: | |
| name: Publish Binaries | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.repository == 'OlegRa/System.DateTimeOnly' && startsWith(github.ref, 'refs/tags/j') | |
| permissions: | |
| contents: write # needed by softprops/action-gh-release to create the GitHub Release | |
| id-token: write # needed to request the OIDC token for NuGet Trusted Publishing | |
| steps: | |
| - name: Load Packages | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: packages-json | |
| - name: NuGet login (OIDC -> temporary API key) | |
| uses: NuGet/login@v1 | |
| id: nuget-login | |
| with: | |
| user: ${{ secrets.NUGET_USER }} | |
| - name: Push to NuGet | |
| run: dotnet nuget push **.nupkg -s https://api.nuget.org/v3/index.json -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| name: Release ${{ github.ref }} | |
| draft: true |