Skip to content

Commit 03159fb

Browse files
committed
workflows [ci skip]
1 parent cad08ba commit 03159fb

9 files changed

+30
-25
lines changed

.github/workflows/Build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
name: windows-latest
4040
runs-on: windows-latest
4141
steps:
42-
- uses: actions/checkout@v1
42+
- uses: actions/checkout@v2
4343
- uses: actions/setup-dotnet@v1
4444
with:
4545
dotnet-version: 5.0.*
@@ -56,12 +56,12 @@ jobs:
5656
- name: Run './build.cmd Compile'
5757
run: ./build.cmd Compile
5858
env:
59-
GITHUB_CONTEXT: ${{ toJSON(github) }}
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
ubuntu-latest:
6161
name: ubuntu-latest
6262
runs-on: ubuntu-latest
6363
steps:
64-
- uses: actions/checkout@v1
64+
- uses: actions/checkout@v2
6565
- uses: actions/setup-dotnet@v1
6666
with:
6767
dotnet-version: 5.0.*
@@ -78,4 +78,4 @@ jobs:
7878
- name: Run './build.cmd Compile'
7979
run: ./build.cmd Compile
8080
env:
81-
GITHUB_CONTEXT: ${{ toJSON(github) }}
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/Release.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
name: windows-latest
2828
runs-on: windows-latest
2929
steps:
30-
- uses: actions/checkout@v1
30+
- uses: actions/checkout@v2
3131
- uses: actions/setup-dotnet@v1
3232
with:
3333
dotnet-version: 5.0.*
@@ -46,4 +46,3 @@ jobs:
4646
env:
4747
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
GITHUB_CONTEXT: ${{ toJSON(github) }}

.github/workflows/Tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
name: windows-latest
3232
runs-on: windows-latest
3333
steps:
34-
- uses: actions/checkout@v1
34+
- uses: actions/checkout@v2
3535
- uses: actions/setup-dotnet@v1
3636
with:
3737
dotnet-version: 5.0.*
@@ -48,12 +48,12 @@ jobs:
4848
- name: Run './build.cmd Test'
4949
run: ./build.cmd Test
5050
env:
51-
GITHUB_CONTEXT: ${{ toJSON(github) }}
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5252
ubuntu-latest:
5353
name: ubuntu-latest
5454
runs-on: ubuntu-latest
5555
steps:
56-
- uses: actions/checkout@v1
56+
- uses: actions/checkout@v2
5757
- uses: actions/setup-dotnet@v1
5858
with:
5959
dotnet-version: 5.0.*
@@ -70,4 +70,4 @@ jobs:
7070
- name: Run './build.cmd Test'
7171
run: ./build.cmd Test
7272
env:
73-
GITHUB_CONTEXT: ${{ toJSON(github) }}
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.nuke/build.schema.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"AppVeyor",
3030
"AzurePipelines",
3131
"Bamboo",
32+
"Bitbucket",
3233
"Bitrise",
3334
"GitHubActions",
3435
"GitLab",
@@ -48,7 +49,7 @@
4849
},
4950
"NuGetApiKey": {
5051
"type": "string",
51-
"default": "Secrets must be entered via 'nuke :secret [profile]'"
52+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
5253
},
5354
"NugetApiUrl": {
5455
"type": "string"
@@ -78,8 +79,10 @@
7879
"items": {
7980
"type": "string",
8081
"enum": [
82+
"AuthenticatedGitHubClient",
8183
"Clean",
8284
"Compile",
85+
"GitHubRelease",
8386
"Pack",
8487
"Release",
8588
"Restore",
@@ -98,8 +101,10 @@
98101
"items": {
99102
"type": "string",
100103
"enum": [
104+
"AuthenticatedGitHubClient",
101105
"Clean",
102106
"Compile",
107+
"GitHubRelease",
103108
"Pack",
104109
"Release",
105110
"Restore",

AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// <auto-generated/>
22
using System.Reflection;
3-
[assembly: AssemblyMetadataAttribute("githash","38c38308d183ecda416ce5b8b946ebe681c2f171")]
3+
[assembly: AssemblyMetadataAttribute("githash","1e1ca97c1fbc34ddd5d7169abfa76575be2312f4")]
44
namespace System {
55
internal static class AssemblyVersionInformation {
6-
internal const System.String AssemblyMetadata_githash = "38c38308d183ecda416ce5b8b946ebe681c2f171";
6+
internal const System.String AssemblyMetadata_githash = "1e1ca97c1fbc34ddd5d7169abfa76575be2312f4";
77
}
88
}
99

CHANGELOG.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
## [vNext]
2-
3-
## [2.7.0-rc.138] / 2022-07-20
42
- Add Custom AVRO definition support @RobertIndie [https://github.com/eaba/AvroSchemaGenerator/commit/81272d5e24e63e152369c14b6c564333fc3aa9ac]
53

64
## [2.6.0] / 2022-02-20
File renamed without changes.

build/Build.cs

+13-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ partial class Build : NukeBuild
3535
/// - Microsoft VisualStudio https://nuke.build/visualstudio
3636
/// - Microsoft VSCode https://nuke.build/vscode
3737

38-
public static int Main() => Execute<Build>(x => x.Test);
38+
public static int Main() => Execute<Build>(x => x.Pack);
3939

4040
[CI] readonly GitHubActions GitHubActions;
4141

@@ -151,6 +151,17 @@ internal static class AssemblyVersionInformation {
151151
//.DependsOn(RunChangelog) requires authrntication in github action
152152
.Executes(() =>
153153
{
154+
var branchName = GitRepository.Branch;
155+
156+
if (branchName.Equals("main", StringComparison.OrdinalIgnoreCase)
157+
&& !GitVersion.MajorMinorPatch.Equals(LatestVersion.Version.ToString()))
158+
{
159+
// Force CHANGELOG.md in case it skipped the mind
160+
Assert.Fail($"CHANGELOG.md needs to be update for final release. Current version: '{LatestVersion.Version}'. Next version: {GitVersion.MajorMinorPatch}");
161+
}
162+
var releaseNotes = branchName.Equals("main", StringComparison.OrdinalIgnoreCase)
163+
? GetNuGetReleaseNotes(ChangelogFile, GitRepository)
164+
: ParseReleaseNote();
154165
var version = GitVersion.SemVer;
155166
var project = Solution.GetProject("AvroSchemaGenerator");
156167
DotNetPack(s => s
@@ -161,7 +172,7 @@ internal static class AssemblyVersionInformation {
161172
.EnableNoRestore()
162173
.SetAssemblyVersion(version)
163174
.SetVersion(version)
164-
.SetPackageReleaseNotes(GetNuGetReleaseNotes(ChangelogFile, GitRepository))
175+
.SetPackageReleaseNotes(releaseNotes)
165176
.SetDescription("Generate Avro Schema with support for RECURSIVE SCHEMA")
166177
.SetPackageTags("Avro", "Schema Generator")
167178
.AddAuthors("Ebere Abanonu (@mestical)")

build/Directory.Build.targets

-8
This file was deleted.

0 commit comments

Comments
 (0)