Skip to content

Commit

Permalink
Push nuget image
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkors committed Mar 19, 2018
1 parent 28174b0 commit 252978a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
18 changes: 13 additions & 5 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ var target = Argument("target", "Pack");
var configuration = Argument("configuration", "Release");
var proj = $"./src/PayEx.Client.csproj";

var version = "0.1.0";
var version = "0.1.0-preview001";
var outputDir = "./output";

Task("Build")
.Does(() => {
Expand All @@ -23,7 +24,7 @@ Task("Pack")
var coresettings = new DotNetCorePackSettings
{
Configuration = "Release",
OutputDirectory = "./output",
OutputDirectory = outputDir,
};
coresettings.MSBuildSettings = new DotNetCoreMSBuildSettings()
.WithProperty("Version", new[] { version });
Expand All @@ -32,9 +33,16 @@ Task("Pack")
DotNetCorePack(proj, coresettings);
});

Task("Default")
.Does(() => {
Information("Hello Cake!");
Task("PublishToNugetOrg")
.IsDependentOn("Pack")
.Does(() => {
var settings = new DotNetCoreNuGetPushSettings
{
Source = "https://api.nuget.org/v3/index.json",
ApiKey = EnvironmentVariable("NUGET_API_KEY")
};

DotNetCoreNuGetPush($"{outputDir}/PayEx.Client.{version}.nupkg", settings);
});

RunTarget(target);
Binary file added images/payex.250x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion src/PayEx.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>PayEx.Client</PackageId>
<Authors>John Korsnes</Authors>
<Description>
A client library for PayEx REST APIs
</Description>
<Copyright>John Korsnes, ice</Copyright>
<PackageTags>payex client</PackageTags>
<PackageProjectUrl>https://github.com/icenorge/payex.client</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/icenorge/payex.client/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/icenorge/payex.client</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/icenorge/payex.client/master/images/payex.250x250.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>
* Adds Vipps payments
* Adds CreditCard payments
</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
Expand Down

0 comments on commit 252978a

Please sign in to comment.