Sha256: 98be7ec42693eb69c89512e9adbac2c995ba555492fa795a703eefa8104c40dd

Contents?: true

Size: 1.14 KB

Versions: 6

Compression:

Stored size: 1.14 KB

Contents

module Dpl
  module Providers
    class Nuget < Provider
      status :alpha

      full_name 'nuget'

      description sq(<<-str)
        tbd
      str

      env :nuget, :dotnet

      opt '--api_key KEY', 'NuGet registry API key', required: true, secret: true, note: 'can be retrieved from your NuGet registry provider', see: 'https://docs.npmjs.com/creating-and-viewing-authentication-tokens'
      opt '--registry URL', 'NuGet registry url', required: true, eg: 'https://www.myget.org/F/org-name/api/v2/package'
      opt '--src SRC', 'The nupkg file(s) to publish', default: '*.nupkg'
      opt '--no_symbols', 'Do not push symbols, even if present'
      opt '--skip_duplicate', 'Do not overwrite existing packages'

      msgs login: 'Authenticating with API key %{api_key}',
           push:  'Pushing package %{src} to %{registry}'

      cmds push: 'dotnet nuget push %{src} -k %{api_key} -s %{registry} %{push_opts}'

      errs push: 'Failed to push'

      def deploy
        info :login
        shell :push
      end

      private

        def push_opts
          opts_for(%i(no_symbols skip_duplicate), dashed: true)
        end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dpl-2.0.3.beta.4 lib/dpl/providers/nuget.rb
dpl-2.0.3.beta.3 lib/dpl/providers/nuget.rb
dpl-2.0.3.beta.2 lib/dpl/providers/nuget.rb
dpl-2.0.3.beta.1 lib/dpl/providers/nuget.rb
dpl-2.0.2.beta.1 lib/dpl/providers/nuget.rb
dpl-2.0.0.beta.3 lib/dpl/providers/nuget.rb