v2.7.1 #13
Workflow file for this run
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: 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: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install client dependencies | |
| run: npm ci | |
| working-directory: src/Client | |
| - name: Build client assets | |
| run: npm run build | |
| working-directory: src/Client | |
| - 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 |