Skip to content

Commit 0c2906f

Browse files
committed
Remove nuke
1 parent dfea71e commit 0c2906f

File tree

10 files changed

+77
-151
lines changed

10 files changed

+77
-151
lines changed

Diff for: .github/workflows/main.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PROJECT_ROOT_PATH/.github/workflows/main.yml
2+
name: main
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 5.0.x
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
- name: Build
23+
run: dotnet build --no-restore
24+
- name: Test
25+
run: dotnet test --no-build --verbosity normal
26+
27+
publish:
28+
29+
runs-on: ubuntu-latest
30+
needs: build
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: publish
35+
id: publish_nuget
36+
uses: rohith/publish-nuget@v2
37+
with:
38+
PROJECT_FILE_PATH: src/LazyCoder/LazyCoder.csproj
39+
TAG_FORMAT: "*"
40+
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

Diff for: .github/workflows/pr.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PROJECT_ROOT_PATH/.github/workflows/pr.yml
2+
name: pr
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*"
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 5.0.x
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
- name: Build
23+
run: dotnet build --no-restore
24+
- name: Test
25+
run: dotnet test --no-build --verbosity normal
26+

Diff for: .nuke

-1
This file was deleted.

Diff for: LazyCoder.sln

-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Microsoft Visual Studio Solution File, Format Version 12.00
33
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazyCoder", "src\LazyCoder\LazyCoder.csproj", "{CE8B9F34-144F-4500-8076-0FBC065F2AD8}"
44
EndProject
5-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "build", "build\build.csproj", "{2F30D2B1-CC4B-44F3-A40C-983779CFAA73}"
6-
EndProject
75
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazyCoder.Tests", "tests\LazyCoder.Tests\LazyCoder.Tests.csproj", "{B3459667-3170-461F-A8AD-5C052BC03487}"
86
EndProject
97
Global
@@ -12,8 +10,6 @@ Global
1210
Release|Any CPU = Release|Any CPU
1311
EndGlobalSection
1412
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{2F30D2B1-CC4B-44F3-A40C-983779CFAA73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{2F30D2B1-CC4B-44F3-A40C-983779CFAA73}.Release|Any CPU.ActiveCfg = Release|Any CPU
1713
{CE8B9F34-144F-4500-8076-0FBC065F2AD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1814
{CE8B9F34-144F-4500-8076-0FBC065F2AD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
1915
{CE8B9F34-144F-4500-8076-0FBC065F2AD8}.Release|Any CPU.ActiveCfg = Release|Any CPU

Diff for: build.ps1

-69
This file was deleted.

Diff for: build.sh

-63
This file was deleted.

Diff for: build/Build.cs

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
using Nuke.Common;
33
using Nuke.Common.Execution;
44
using Nuke.Common.Git;
5+
using Nuke.Common.IO;
56
using Nuke.Common.ProjectModel;
67
using Nuke.Common.Tooling;
78
using Nuke.Common.Tools.DotNet;
9+
using Nuke.Common.Tools.GitHub;
810
using Nuke.Common.Tools.GitVersion;
911
using Nuke.Common.Utilities.Collections;
1012
using static Nuke.Common.IO.FileSystemTasks;
@@ -17,10 +19,7 @@ class Build: NukeBuild
1719
public static int Main() => Execute<Build>(x => x.Compile);
1820

1921
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
20-
readonly Configuration Configuration =
21-
IsLocalBuild
22-
? Configuration.Debug
23-
: Configuration.Release;
22+
readonly string Configuration = IsLocalBuild ? "Debug" : "Release";
2423

2524
[Parameter("NuGet api key")] readonly string ApiKey;
2625
readonly string LicenseFile = RootDirectory / "LICENSE";
@@ -65,10 +64,8 @@ Target Compile
6564
DotNetBuild(s => s
6665
.SetProjectFile(Solution)
6766
.SetConfiguration(Configuration)
68-
.SetAssemblyVersion(GitVersion
69-
.GetNormalizedAssemblyVersion())
70-
.SetFileVersion(GitVersion
71-
.GetNormalizedFileVersion())
67+
.SetAssemblyVersion(GitVersion.AssemblySemVer)
68+
.SetFileVersion(GitVersion.AssemblySemFileVer)
7269
.SetInformationalVersion(GitVersion
7370
.InformationalVersion)
7471
.EnableNoRestore());
@@ -101,7 +98,7 @@ Target Publish
10198
=> _ => _
10299
.DependsOn(Pack)
103100
.Requires(() => ApiKey)
104-
.Requires(() => Equals(Configuration, Configuration.Release))
101+
.Requires(() => Equals(Configuration, "Release"))
105102
.Executes(() =>
106103
{
107104
GlobFiles(ArtifactsDirectory, "*.nupkg")

Diff for: build/build.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<TargetFramework>net5.0</TargetFramework>
66
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
77
<RootNamespace></RootNamespace>
88
<IsPackable>False</IsPackable>
99
<NoWarn>CS0649;CS0169</NoWarn>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Nuke.Common" Version="0.16.0" />
13+
<PackageReference Include="Nuke.Common" Version="5.3.0" />
1414
<PackageReference Include="GitVersion.CommandLine.DotNetCore" Version="4.0.1-beta1-49" />
1515
</ItemGroup>
1616

Diff for: src/LazyCoder/LazyCoder.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<LangVersion>8</LangVersion>
4+
<TargetFramework>net5.0</TargetFramework>
5+
<LangVersion>9</LangVersion>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

Diff for: tests/LazyCoder.Tests/LazyCoder.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
1212
<PackageReference Include="Shouldly" Version="4.0.3" />
1313
<PackageReference Include="xunit" Version="2.4.1" />
1414
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

0 commit comments

Comments
 (0)