Skip to content

chore(main): release 2.1.6 #438

chore(main): release 2.1.6

chore(main): release 2.1.6 #438

Workflow file for this run

name: CI/CD Pipeline
on:
pull_request:
branches: [ main ]
paths-ignore:
- "docs/**"
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
- ".claude/**"
release:
types: [ published ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore --locked-mode
- name: Check formatting
run: |
dotnet tool restore
dotnet csharpier check .
- name: Test
run: dotnet test --configuration Release --verbosity normal --no-restore
publish:
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # OIDC token for NuGet trusted publishing
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore --locked-mode
- name: Build and Pack
run: dotnet pack JsonApiToolkit/JsonApiToolkit.csproj -c Release --no-restore
# Exchange OIDC token for a short-lived NuGet API key
- name: NuGet login
id: login
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
with:
user: ${{ secrets.NUGET_USER }}
- name: Publish to NuGet.org
run: dotnet nuget push "JsonApiToolkit/bin/Release/*.nupkg"
--source https://api.nuget.org/v3/index.json
--api-key ${{ steps.login.outputs.NUGET_API_KEY }}
--skip-duplicate