Publish UUIDNext.Cli to NuGet #8
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 UUIDNext.Cli to NuGet | |
| on: workflow_dispatch | |
| defaults: | |
| run: | |
| working-directory: Src | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Test | |
| run: dotnet test -c Release --no-build --framework net8.0 | |
| - name: Pack nugets | |
| run: dotnet pack "./UUIDNext.Cli/UUIDNext.Cli.csproj" -c Release --no-build --output . | |
| - name: Push to NuGet | |
| run: dotnet nuget push "UUIDNext.Cli.*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json |