Release #7
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: Release | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| name: Build & Publish Packages | |
| runs-on: windows-latest | |
| environment: | |
| name: production | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0 | |
| - name: Setup NuGet CLI | |
| uses: NuGet/setup-nuget@v2 | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build solution | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Pack regular packages | |
| run: dotnet pack --configuration Release -p:ContinuousIntegrationBuild=true --no-build --output ./artifacts | |
| - name: Pack meta packages | |
| working-directory: Packages | |
| run: | | |
| nuget pack GenHTTP.Core.nuspec -OutputDirectory ../artifacts | |
| nuget pack GenHTTP.Core.Kestrel.nuspec -OutputDirectory ../artifacts | |
| - name: List gathered packages | |
| run: dir artifacts | |
| - name: Publish packages to NuGet | |
| working-directory: artifacts | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| run: dotnet nuget push *.nupkg --api-key "$env:NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate | |