Skip to content

.NET Build Push

This Composite Action is used to build, then push a package to a NuGet registry.

Do note this forces the type pack of build.

.NET Push NuGet

- uses: Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-build-push-nuget@main
  with:
    dotnet-nuget-auth-token: (1)
  1. Authentication token for the NuGet registry.

Pushes nugets the registry

Inputs: ยค

Name Description Default
dotnet-nuget-out-path

Path under which Nugets will be put after the build.

${{ github.workspace }}/nupkgs
dotnet-nuget-registry-url

Publishing URL of the NuGet registry.

https://api.nuget.org/v3/index.json
dotnet-nuget-auth-token

Authentication token for the NuGet registry.

Source of Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-build-push-nuget@main
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: '.NET Push NuGet'
description: 'Pushes nugets the registry'

inputs:
  dotnet-nuget-out-path:
    description: 'Path under which Nugets will be put after the build.'
    default: '${{ github.workspace }}/nupkgs'
    required: false
  dotnet-nuget-registry-url:
    description: 'Publishing URL of the NuGet registry.'
    default: 'https://api.nuget.org/v3/index.json'
    required: false
  dotnet-nuget-auth-token:
    description: 'Authentication token for the NuGet registry.'
    required: true

runs:
  using: composite

  steps:
    - name: 'Publish package to registry'
      shell: bash
      run: dotnet nuget push ${{ inputs.dotnet-nuget-out-path }}/*.nupkg -k ${{ inputs.dotnet-nuget-auth-token }} -s ${{ inputs.dotnet-nuget-registry-url }}