mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 15:09:29 +00:00
Create DeployToMyGetTask
This commit is contained in:
committed by
GitHub
parent
809b525e43
commit
9d73597323
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user