-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
199 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
- Initial implementation | ||
## [vNext] | ||
- Added initial implementation | ||
- Implements CI build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,40 @@ | ||
using System.Linq; | ||
using System.Text; | ||
using Nuke.Common; | ||
using Nuke.Common.Git; | ||
using Nuke.Common.Tooling; | ||
using Nuke.Common.Tools.GitHub; | ||
using Nuke.Community.GitHub; | ||
using static Nuke.Common.ChangeLog.ChangelogTasks; | ||
using static Nuke.Community.GitHub.GitHubTasks; | ||
|
||
internal partial class Build | ||
{ | ||
[Parameter("GitHub auth token")] private readonly string GitHubToken; | ||
|
||
Target DraftRelease => _ => _ | ||
.DependsOn(Publish) | ||
.Requires(() => GitRepository.IsGitHubRepository()) | ||
.Executes(() => | ||
{ | ||
GitHubPublishRelease(s => s | ||
.SetAuthToken(GitHubToken) | ||
.EnableDraft() | ||
.SetTag(GitVersion.NuGetVersionV2) | ||
.SetReleaseName($"Version {GitVersion.NuGetVersionV2}") | ||
.SetReleaseBody("# Changes ") | ||
.SetTargetCommitish(GitVersion.Sha) | ||
.When(GitRepository.IsOnDevelopBranch(), | ||
_ => _.EnablePrerelease()) | ||
.When(GitRepository.IsOnMasterBranch(), | ||
_ => _.DisablePrerelease())); | ||
}); | ||
private Target DraftRelease => _ => _ | ||
.DependsOn(Publish) | ||
.Requires(() => GitRepository.IsGitHubRepository()) | ||
.Executes(() => | ||
{ | ||
var releaseBody = ExtractChangelogSectionNotes(ChangelogFile) | ||
.Aggregate( | ||
new StringBuilder("# Changes").AppendLine().AppendLine(), | ||
(b, s) => b.AppendLine(s)) | ||
.ToString(); | ||
GitHubPublishRelease(s => s | ||
.SetAuthToken(GitHubToken) | ||
.SetRepositoryName(GitRepository.GetGitHubName()) | ||
.SetRepositoryOwner(GitRepository.GetGitHubOwner()) | ||
.EnableDraft() | ||
.SetTag($"v{GitVersion.NuGetVersionV2}") | ||
.SetReleaseName($"Version {GitVersion.NuGetVersionV2}") | ||
.SetReleaseBody(releaseBody) | ||
.SetTargetCommitish(GitVersion.Sha) | ||
.When(GitRepository.IsOnDevelopBranch(), | ||
_ => _.EnablePrerelease()) | ||
.When(GitRepository.IsOnMasterBranch(), | ||
_ => _.DisablePrerelease())); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...Community.GitHub/GitHubReleaseSettings.cs → build/GitHub/GitHubReleaseSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.