Skip to content

Commit

Permalink
Merge pull request #56 from Kiryuumaru/feat/updated-deps
Browse files Browse the repository at this point in the history
Updated deps
  • Loading branch information
Kiryuumaru committed May 29, 2024
2 parents cc93f1f + e0efb84 commit faa34a7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
66 changes: 37 additions & 29 deletions build/TransactionHelpersEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using NukeBuildHelpers;
using NukeBuildHelpers.Attributes;
using NukeBuildHelpers.Enums;
using NukeBuildHelpers.Models.RunContext;
using Semver;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -17,43 +19,49 @@ public class TransactionHelpersEntry : AppEntry<Build>

public override RunsOnType PublishRunsOn => RunsOnType.Ubuntu2204;

[SecretHelper("NUGET_AUTH_TOKEN")]
[SecretVariable("NUGET_AUTH_TOKEN")]
readonly string NuGetAuthToken;

[SecretHelper("GITHUB_TOKEN")]
[SecretVariable("GITHUB_TOKEN")]
readonly string GithubToken;

public override bool RunParallel => false;
public override bool MainRelease => true;

public override void Build()
public override void Build(AppRunContext appRunContext)
{
OutputDirectory.DeleteDirectory();
DotNetTasks.DotNetClean(_ => _
.SetProject(NukeBuild.Solution.TransactionHelpers));
DotNetTasks.DotNetBuild(_ => _
.SetProjectFile(NukeBuild.Solution.TransactionHelpers)
.SetConfiguration("Release"));
DotNetTasks.DotNetPack(_ => _
.SetProject(NukeBuild.Solution.TransactionHelpers)
.SetConfiguration("Release")
.SetNoRestore(true)
.SetNoBuild(true)
.SetIncludeSymbols(true)
.SetSymbolPackageFormat("snupkg")
.SetVersion(NewVersion?.Version?.ToString() ?? "0.0.0")
.SetPackageReleaseNotes(NewVersion?.ReleaseNotes)
.SetOutputDirectory(OutputDirectory));
if (appRunContext is AppBumpRunContext appBumpRunContext)
{
OutputDirectory.DeleteDirectory();
DotNetTasks.DotNetClean(_ => _
.SetProject(NukeBuild.Solution.TransactionHelpers));
DotNetTasks.DotNetBuild(_ => _
.SetProjectFile(NukeBuild.Solution.TransactionHelpers)
.SetConfiguration("Release"));
DotNetTasks.DotNetPack(_ => _
.SetProject(NukeBuild.Solution.TransactionHelpers)
.SetConfiguration("Release")
.SetNoRestore(true)
.SetNoBuild(true)
.SetIncludeSymbols(true)
.SetSymbolPackageFormat("snupkg")
.SetVersion(appBumpRunContext.AppVersion.Version?.ToString() ?? "0.0.0")
.SetPackageReleaseNotes(appBumpRunContext.AppVersion.ReleaseNotes)
.SetOutputDirectory(OutputDirectory));
}
}

public override void Publish()
public override void Publish(AppRunContext appRunContext)
{
DotNetTasks.DotNetNuGetPush(_ => _
.SetSource("https://nuget.pkg.github.com/kiryuumaru/index.json")
.SetApiKey(GithubToken)
.SetTargetPath(OutputDirectory / "**"));
DotNetTasks.DotNetNuGetPush(_ => _
.SetSource("https://api.nuget.org/v3/index.json")
.SetApiKey(NuGetAuthToken)
.SetTargetPath(OutputDirectory / "**"));
if (appRunContext is AppBumpRunContext)
{
DotNetTasks.DotNetNuGetPush(_ => _
.SetSource("https://nuget.pkg.github.com/kiryuumaru/index.json")
.SetApiKey(GithubToken)
.SetTargetPath(OutputDirectory / "**"));
DotNetTasks.DotNetNuGetPush(_ => _
.SetSource("https://api.nuget.org/v3/index.json")
.SetApiKey(NuGetAuthToken)
.SetTargetPath(OutputDirectory / "**"));
}
}
}
7 changes: 4 additions & 3 deletions build/TransactionHelpersTestEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using NukeBuildHelpers.Attributes;
using NukeBuildHelpers.Enums;
using NukeBuildHelpers.Models;
using NukeBuildHelpers.Models.RunContext;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -14,13 +15,13 @@ namespace _build;

public class TransactionHelpersTestEntry : AppTestEntry<Build>
{
public override bool RunParallel => false;

public override RunsOnType RunsOn => RunsOnType.Ubuntu2204;

public override RunTestType RunTestOn => RunTestType.All;

public override Type[] AppEntryTargets => [typeof(TransactionHelpersEntry)];

public override void Run()
public override void Run(AppTestRunContext appTestContext)
{
DotNetTasks.DotNetClean(_ => _
.SetProject(NukeBuild.Solution.TransactionHelpers_UnitTest));
Expand Down
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageReference Include="NukeBuildHelpers" Version="1.0.2" />
<PackageReference Include="NukeBuildHelpers" Version="2.4.0" />
</ItemGroup>

</Project>

0 comments on commit faa34a7

Please sign in to comment.