Trusted Publishing on nuget.org; publish 2.0 as 2.0.0-preview.1 #47
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: Pull Request | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "**/*.md" | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: ['windows-latest','ubuntu-latest'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| # global.json pins the SDK; the 8.0 runtime is needed for the net8.0 test target. | |
| global-json-file: global.json | |
| dotnet-version: | | |
| 8.0.x | |
| 10.0.x | |
| - name: Install dependencies | |
| run: dotnet restore AustinHarris.JsonRpc.sln | |
| # Building the solution packs every package project (GeneratePackageOnBuild); `dotnet pack` on the | |
| # solution would trip NU5026 with GeneratePackageOnBuild, so the packages come from the build. | |
| - name: Build | |
| run: dotnet build AustinHarris.JsonRpc.sln --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test AustinHarris.JsonRpcTestN --configuration Release --no-build | |
| # Pull requests do not publish. Packages go out from the master workflow through Trusted Publishing, whose | |
| # nuget.org policy is bound to build_publish_master.yml; nothing else can push. |