Skip to content

v8.0.0

v8.0.0 #22

name: Release to NuGet
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-and-publish:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
id-token: write
environment: release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore ObjectSemantics.NET.Tests/ObjectSemantics.NET.Tests.csproj
- name: Build
run: dotnet build ObjectSemantics.NET.Tests/ObjectSemantics.NET.Tests.csproj -c Release --no-restore
- name: Test
run: dotnet test ObjectSemantics.NET.Tests/ObjectSemantics.NET.Tests.csproj -c Release --no-build --no-restore
- name: Pack
run: dotnet pack ObjectSemantics.NET/ObjectSemantics.NET.csproj -c Release --no-build --no-restore --output artifacts
- name: NuGet login
uses: NuGet/login@v1
id: login
with:
user: swagfin
- name: Push to NuGet
env:
NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
run: dotnet nuget push "artifacts/*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json