Skip to content

Trusted Publishing on nuget.org; publish 2.0 as 2.0.0-preview.1 #46

Trusted Publishing on nuget.org; publish 2.0 as 2.0.0-preview.1

Trusted Publishing on nuget.org; publish 2.0 as 2.0.0-preview.1 #46

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.