mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-21 01:39:32 +00:00
26 lines
706 B
C#
26 lines
706 B
C#
using Cake.Common.Tools.DotNet;
|
|
using Cake.Common.Tools.DotNet.NuGet.Push;
|
|
using Cake.Frosting;
|
|
|
|
namespace BuildScripts;
|
|
|
|
[TaskName(nameof(DeployToMyGetTask))]
|
|
public sealed class DeployToMyGetTask : FrostingTask<BuildContext>
|
|
{
|
|
public override bool ShouldRun(BuildContext context)
|
|
{
|
|
return context.IsRunningOnGitHubActions;
|
|
}
|
|
|
|
public override void Run(BuildContext context)
|
|
{
|
|
DotNetNuGetPushSettings pushSettings = new DotNetNuGetPushSettings()
|
|
{
|
|
Source = $"https://www.myget.org/F/lithiumtoast/api/v3/index.json",
|
|
ApiKey = context.MyGetAccessToken
|
|
};
|
|
|
|
context.DotNetNuGetPush("artifacts/*.nupkg", pushSettings);
|
|
}
|
|
}
|