Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/alpha-deployment.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/code-quality.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/macos-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ name: macos-latest
on:
push:
branches-ignore:
- master
- 'release/*'
- main
pull_request:
branches:
- develop
- main
paths-ignore:
- 'docs/**'
- 'images/**'
- '**/*.md'

jobs:
macos-latest:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ubuntu-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ name: ubuntu-latest
on:
push:
branches-ignore:
- master
- 'release/*'
- main
pull_request:
branches:
- develop
- main
paths-ignore:
- 'docs/**'
- 'images/**'
- '**/*.md'

jobs:
ubuntu-latest:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/windows-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ name: windows-latest
on:
push:
branches-ignore:
- master
- 'release/*'
- main
pull_request:
branches:
- develop
- main
paths-ignore:
- 'docs/**'
- 'images/**'
- '**/*.md'

jobs:
windows-latest:
Expand Down
15 changes: 10 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ Do not commit code generated by `GenerateTools` — per `CONTRIBUTING.md`, gener

## Branching & releases

GitFlow:
- `develop` — integration branch, base for all PRs
- `release/*` — release stabilization
- `master` — published releases (publishes to public NuGet)
- `hotfix/*` — patches against `master`
Trunk-based:
- `main` — single long-lived branch. Default branch on GitHub. Every merge can publish a release.
- `feature/<slug>`, `bugfix/<slug>`, `chore/<slug>`, `pr/<num>-<slug>` — short-lived branches, opened as PRs against `main`.
- No `develop`, `release/*`, `master`, or `hotfix/*` branches.

CI providers in use: **GitHub Actions only** (the other providers were dropped — see [#7](https://github.com/ChrisonSimtian/nuke/issues/7) for the demand-driven revival roadmap).

Validation workflows (`ubuntu-latest`, `windows-latest`, `macos-latest`) run on every push to non-main branches and every PR targeting `main`, with `paths-ignore` for `docs/**`, `images/**`, `**/*.md`.

Release pipeline is being introduced in a follow-up PR alongside Nerdbank.GitVersioning. GitVersion is still in use until that lands.

Alpha packages flow to the Feedz feed (`https://f.feedz.io/nuke/alpha/nuget`) from `develop` via the GitHub Actions `AlphaDeployment` workflow. Public NuGet publishes happen from `master`/`release/*` via AppVeyor.

Expand Down
2 changes: 1 addition & 1 deletion build/Build.Announce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ partial class Build
.DependsOn(ReleaseImage)
.WhenSkipped(DependencyBehavior.Skip)
// .TriggeredBy<IPublish>()
.OnlyWhenStatic(() => GitRepository.IsOnMasterBranch());
.OnlyWhenStatic(() => GitRepository.IsOnMainBranch());

IEnumerable<string> ChangelogSectionNotes => ChangelogTasks.ExtractChangelogSectionNotes(From<IHazChangelog>().ChangelogFile);

Expand Down
32 changes: 16 additions & 16 deletions build/Build.CI.GitHubActions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Maintainers of NUKE.
// Copyright 2023 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE

Expand All @@ -9,36 +9,36 @@
"windows-latest",
GitHubActionsImage.WindowsLatest,
FetchDepth = 0,
OnPushBranchesIgnore = new[] { MasterBranch, $"{ReleaseBranchPrefix}/*" },
OnPullRequestBranches = new[] { DevelopBranch },
OnPushBranchesIgnore = new[] { MainBranch },
OnPullRequestBranches = new[] { MainBranch },
OnPullRequestExcludePaths = new[] { "docs/**", "images/**", "**/*.md" },
InvokedTargets = new[] { nameof(ITest.Test), nameof(IPack.Pack) },
PublishArtifacts = false)]
[GitHubActions(
"macos-latest",
GitHubActionsImage.MacOsLatest,
FetchDepth = 0,
OnPushBranchesIgnore = new[] { MasterBranch, $"{ReleaseBranchPrefix}/*" },
OnPullRequestBranches = new[] { DevelopBranch },
OnPushBranchesIgnore = new[] { MainBranch },
OnPullRequestBranches = new[] { MainBranch },
OnPullRequestExcludePaths = new[] { "docs/**", "images/**", "**/*.md" },
InvokedTargets = new[] { nameof(ITest.Test), nameof(IPack.Pack) },
PublishArtifacts = false)]
[GitHubActions(
"ubuntu-latest",
GitHubActionsImage.UbuntuLatest,
FetchDepth = 0,
OnPushBranchesIgnore = new[] { MasterBranch, $"{ReleaseBranchPrefix}/*" },
OnPullRequestBranches = new[] { DevelopBranch },
OnPushBranchesIgnore = new[] { MainBranch },
OnPullRequestBranches = new[] { MainBranch },
OnPullRequestExcludePaths = new[] { "docs/**", "images/**", "**/*.md" },
InvokedTargets = new[] { nameof(ITest.Test), nameof(IPack.Pack) },
PublishArtifacts = false)]
[GitHubActions(
AlphaDeployment,
GitHubActionsImage.UbuntuLatest,
FetchDepth = 0,
OnPushBranches = new[] { DevelopBranch },
InvokedTargets = new[] { nameof(IPublish.Publish) },
EnableGitHubToken = true,
PublishArtifacts = false,
ImportSecrets = new[] { nameof(FeedzNuGetApiKey) })]
partial class Build
{
// AlphaDeployment workflow removed in trunk migration. The release pipeline
// is reintroduced in the follow-up Nerdbank.GitVersioning PR with proper
// main-branch publish semantics. Code paths still referencing this constant
// (Test.OnlyWhenStatic, Pack.PackSettings, Publish.Requires, DeletePackages)
// are intentionally preserved — they evaluate to false until a workflow
// with this name exists again.
const string AlphaDeployment = "alpha-deployment";
}
2 changes: 1 addition & 1 deletion build/Build.CodeGeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ partial class Build
GenerateCode(
x,
namespaceProvider: x => $"Nuke.Common.Tools.{x.Name}",
sourceFileProvider: x => GitRepository.SetBranch(MasterBranch).GetGitHubBrowseUrl(x.SpecificationFile)));
sourceFileProvider: x => GitRepository.SetBranch(MainBranch).GetGitHubBrowseUrl(x.SpecificationFile)));
});
}
114 changes: 0 additions & 114 deletions build/Build.GitFlow.cs

This file was deleted.

17 changes: 10 additions & 7 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ partial class Build
AbsolutePath OutputDirectory => RootDirectory / "output";
AbsolutePath SourceDirectory => RootDirectory / "source";

const string MasterBranch = "master";
const string DevelopBranch = "develop";
const string ReleaseBranchPrefix = "release";
const string HotfixBranchPrefix = "hotfix";
const string MainBranch = "main";

// Versioning constants moved from former Build.GitFlow.cs.
// Trunk-based; Nerdbank.GitVersioning will replace GitVersion in a follow-up PR.
[Parameter] readonly bool Major;
string MajorMinorPatchVersion => Major ? $"{GitVersion.Major + 1}.0.0" : GitVersion.MajorMinorPatch;
string MilestoneTitle => $"v{MajorMinorPatchVersion}";

AbsolutePath IHazArtifacts.ArtifactsDirectory => RootDirectory / "output";

Expand Down Expand Up @@ -128,14 +131,14 @@ from framework in project.GetTargetFrameworks()
[Parameter] [Secret] readonly string PublicNuGetApiKey;
[Parameter] [Secret] readonly string FeedzNuGetApiKey;

bool IsPublicRelease => GitRepository.IsOnMasterBranch() || GitRepository.IsOnReleaseBranch();
bool IsPublicRelease => GitRepository.IsOnMainBranch();
string IPublish.NuGetSource => IsPublicRelease ? PublicNuGetSource : FeedzNuGetSource;
string IPublish.NuGetApiKey => IsPublicRelease ? PublicNuGetApiKey : FeedzNuGetApiKey;

Target IPublish.Publish => _ => _
.Inherit<IPublish>()
.Consumes(From<IPack>().Pack)
.Requires(() => GitRepository.IsOnDevelopBranch() && Host is GitHubActions && GitHubActions.Workflow == AlphaDeployment)
.Requires(() => GitRepository.IsOnMainBranch() && Host is GitHubActions && GitHubActions.Workflow == AlphaDeployment)
.WhenSkipped(DependencyBehavior.Execute);

IEnumerable<AbsolutePath> NuGetPackageFiles
Expand Down Expand Up @@ -173,7 +176,7 @@ void DeletePackage(string id, string version)
.Inherit<ICreateGitHubRelease>()
.TriggeredBy<IPublish>()
.ProceedAfterFailure()
.OnlyWhenStatic(() => GitRepository.IsOnMasterBranch())
.OnlyWhenStatic(() => GitRepository.IsOnMainBranch())
.Executes(async () =>
{
var issues = await GitRepository.GetGitHubMilestoneIssues(MilestoneTitle);
Expand Down
Loading
Loading