add publish to nuget

This commit is contained in:
rafael-aero
2021-06-28 14:31:33 +02:00
parent f08711e41b
commit 94b5faafcd
3 changed files with 33 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
variables:
ENETVER: 12.0.0.$(Build.BuildId)
PackageVersion: 12.0.0.$(Build.BuildId)
projectAPI: './ElectronNet.API/ElectronNet.API.csproj'
projectCLI: './ElectronNet.CLI/ElectronNet.CLI.csproj'
@@ -40,13 +40,13 @@ steps:
inputs:
command: 'build'
projects: '$(projectAPI)'
arguments: '--configuration Release --force /property:Version=$(ENETVER)'
arguments: '--configuration Release --force /property:Version=$(PackageVersion)'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '$(projectCLI)'
arguments: '--configuration Release --force /property:Version=$(ENETVER)'
arguments: '--configuration Release --force /property:Version=$(PackageVersion)'
- task: DotNetCoreCLI@2
inputs:
@@ -54,7 +54,7 @@ steps:
packagesToPack: '$(projectAPI)'
configuration: 'Release'
versioningScheme: 'off'
buildProperties: 'Version=$(ENETVER)'
buildProperties: 'Version=$(PackageVersion)'
- task: DotNetCoreCLI@2
inputs:
@@ -62,4 +62,22 @@ steps:
packagesToPack: '$(projectCLI)'
configuration: 'Release'
versioningScheme: 'off'
buildProperties: 'Version=$(ENETVER)'
buildProperties: 'Version=$(PackageVersion)'
- task: NuGetCommand@2
displayName: 'push API to nuget'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/ElectronNET.API.$(PackageVersion).nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'nuget-curiosity'
- task: NuGetCommand@2
displayName: 'push CLI to nuget'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/ElectronNET.CLI.$(PackageVersion).nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'nuget-curiosity'

View File

@@ -4,15 +4,15 @@
<TargetFramework>net5.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>..\artifacts</PackageOutputPath>
<PackageId>ElectronNET.API</PackageId>
<Authors>Gregor Biswanger, Robert Muehsig</Authors>
<PackageId>h5.ElectronNET.API</PackageId>
<Authors>Gregor Biswanger, Robert Muehsig, Rafael Oliveira</Authors>
<Company />
<Product>Electron.NET</Product>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/ElectronNET/Electron.NET/</PackageProjectUrl>
<PackageProjectUrl>https://github.com/theolivenbaum/Electron.NET/</PackageProjectUrl>
<Description>Building cross platform electron based desktop apps with .NET Core and ASP.NET Core.
This package contains the API to access the "native" electron API.</Description>
<RepositoryUrl>https://github.com/ElectronNET/Electron.NET/</RepositoryUrl>
<RepositoryUrl>https://github.com/theolivenbaum/Electron.NET/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageTags>electron aspnetcore</PackageTags>

View File

@@ -5,15 +5,15 @@
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>dotnet-electronize</AssemblyName>
<ToolCommandName>electronize</ToolCommandName>
<ToolCommandName>electronize-h5</ToolCommandName>
<PackageType>DotnetCliTool</PackageType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>..\artifacts</PackageOutputPath>
<PackageId>ElectronNET.CLI</PackageId>
<PackageId>h5.ElectronNET.CLI</PackageId>
<!-- Version 99 is just set for local development stuff to avoid a conflict with "real" packages on NuGet.org -->
<Version>99.0.0.0</Version>
<Authors>Gregor Biswanger, Robert Muehsig</Authors>
<Authors>Gregor Biswanger, Robert Muehsig, Rafael Oliveira</Authors>
<Product>Electron.NET</Product>
<Company />
<Description>
@@ -21,12 +21,12 @@
This package contains the dotnet tooling to electronize your application.
</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/ElectronNET/Electron.NET/</PackageProjectUrl>
<RepositoryUrl>https://github.com/ElectronNET/Electron.NET/</RepositoryUrl>
<PackageProjectUrl>https://github.com/theolivenbaum/Electron.NET/</PackageProjectUrl>
<RepositoryUrl>https://github.com/theolivenbaum/Electron.NET/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageTags>electron aspnetcore</PackageTags>
<PackageReleaseNotes>Changelog: https://github.com/ElectronNET/Electron.NET/blob/master/Changelog.md</PackageReleaseNotes>
<PackageReleaseNotes>Changelog: https://github.com/theolivenbaum/Electron.NET/blob/master/Changelog.md</PackageReleaseNotes>
<PackageIcon>PackageIcon.png</PackageIcon>
<PackAsTool>true</PackAsTool>
<StartupObject></StartupObject>