Skip to content

v2.7.0

v2.7.0 #12

Workflow file for this run

name: Publish to NuGet
on:
release:
types: [published]
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build src/XperienceCommunity.Sustainability.csproj --configuration Release --no-restore
- name: Pack
run: dotnet pack src/XperienceCommunity.Sustainability.csproj --configuration Release --no-build --output nupkg
- name: NuGet login (OIDC)
uses: NuGet/login@v1
id: nuget_login
with:
user: liamgold
- name: Publish to NuGet using Trusted Publishing
run: dotnet nuget push nupkg/*.nupkg --api-key "${{ steps.nuget_login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate