Skip to content

Commit

Permalink
Merge pull request #529 from Inxton/528-consider-limiting-what-packag…
Browse files Browse the repository at this point in the history
…es-need-to-be-released

Limits the packages to be released. Apax package will be released past v1.
  • Loading branch information
PTKu authored Jan 22, 2025
2 parents 897afa3 + c5a6ddc commit 898d7f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cake/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

internal class Helpers
{
public static readonly IEnumerable<string> PublishInternal = new List<string>() { "dev", "dev-2311", "main", "master", "release" };
public static readonly IEnumerable<string> PublishInternal = new List<string>() { "dev", "main", "master", "release" };
public static readonly IEnumerable<string> PublishExternal = new List<string>() { "main", "master", "release" };

public static bool CanReleaseInternal()
Expand Down
11 changes: 7 additions & 4 deletions cake/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -872,11 +872,14 @@ public override void Run(BuildContext context)
}

if (Helpers.CanReleaseInternal())
{
context.ApaxPublish();
{
if(int.Parse(GitVersionInformation.Major) >= 1)
{
context.ApaxPublish();
}


foreach (var nugetFile in Directory.EnumerateFiles(Path.Combine(context.Artifacts, @"nugets"), "*.nupkg")
foreach (var nugetFile in Directory.EnumerateFiles(Path.Combine(context.Artifacts, @"nugets"), "*.nupkg")
.Select(p => new FileInfo(p)))
{
context.DotNetNuGetPush(nugetFile.FullName,
Expand Down Expand Up @@ -906,7 +909,7 @@ public override void Run(BuildContext context)
if (Helpers.CanReleaseInternal())
{
var githubToken = context.Environment.GetEnvironmentVariable("GH_TOKEN");
var githubClient = new GitHubClient(new ProductHeaderValue("IX"));
var githubClient = new GitHubClient(new ProductHeaderValue("INXTON"));
githubClient.Credentials = new Credentials(githubToken);

var release = githubClient.Repository.Release.Create(
Expand Down

0 comments on commit 898d7f4

Please sign in to comment.