Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 1898884

Browse files
committed
Add support for .NET6 and .NET7
1 parent f793a20 commit 1898884

9 files changed

Lines changed: 72 additions & 66 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ name: build
33
on:
44
push:
55
paths:
6-
- 'src/**'
6+
- "src/**"
77
branches:
88
- main
99
- develop
1010
pull_request:
1111
paths:
12-
- 'src/**'
12+
- "src/**"
1313

1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v3
21-
with:
22-
dotnet-version: |
23-
3.1.x
24-
6.0.x
18+
- uses: actions/checkout@v3
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: |
23+
6.0.x
24+
7.0.x
2525
26-
- name: Build with dotnet
27-
run: dotnet build ./src/ClashOfClans.sln
26+
- name: Build with dotnet
27+
run: dotnet build ./src/ClashOfClans.sln

.github/workflows/docfx.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: docs
33
on:
44
push:
55
paths:
6-
- 'docfx/**'
7-
- 'src/ClashOfClans/**'
8-
- 'src/ClashOfClans.Models/**'
6+
- "docfx/**"
7+
- "src/ClashOfClans/**"
8+
- "src/ClashOfClans.Models/**"
99
branches:
1010
- develop
1111

@@ -14,32 +14,32 @@ jobs:
1414
runs-on: windows-latest
1515

1616
steps:
17-
- run: git config --global user.name ${env:GITHUB_ACTOR}
18-
- run: git config --global user.email ${env:GITHUB_ACTOR}@users.noreply.github.com
19-
20-
- uses: actions/checkout@v3
21-
with:
22-
token: ${{ secrets.DOCFX_API_KEY }}
23-
- uses: actions/setup-dotnet@v3
24-
with:
25-
dotnet-version: '6.0.x'
26-
27-
- name: Build with dotnet
28-
run: dotnet build ./src/ClashOfClans/ClashOfClans.csproj
29-
30-
- name: Setup DocFX
31-
run: choco install docfx
32-
33-
- name: Build with DocFX
34-
working-directory: docfx
35-
run: |
36-
Remove-Item ../docs/ -Recurse
37-
docfx
38-
39-
- name: Stage all changes
40-
run: git add -A
41-
42-
- name: Update GitHub Pages
43-
run: |
44-
git commit -am "Update GitHub Pages"
45-
git push
17+
- run: git config --global user.name ${env:GITHUB_ACTOR}
18+
- run: git config --global user.email ${env:GITHUB_ACTOR}@users.noreply.github.com
19+
20+
- uses: actions/checkout@v3
21+
with:
22+
token: ${{ secrets.DOCFX_API_KEY }}
23+
- uses: actions/setup-dotnet@v3
24+
with:
25+
dotnet-version: "7.0.x"
26+
27+
- name: Build with dotnet
28+
run: dotnet build ./src/ClashOfClans/ClashOfClans.csproj
29+
30+
- name: Setup DocFX
31+
run: choco install docfx
32+
33+
- name: Build with DocFX
34+
working-directory: docfx
35+
run: |
36+
Remove-Item ../docs/ -Recurse
37+
docfx
38+
39+
- name: Stage all changes
40+
run: git add -A
41+
42+
- name: Update GitHub Pages
43+
run: |
44+
git commit -am "Update GitHub Pages"
45+
git push

.github/workflows/nuget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v3
1111
- uses: actions/setup-dotnet@v3
1212
with:
13-
dotnet-version: "6.0.x"
13+
dotnet-version: "7.0.x"
1414

1515
- name: Setup NuGet CLI
1616
run: choco install nuget.commandline

.github/workflows/tests.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ name: tests
33
on:
44
push:
55
paths:
6-
- 'src/ClashOfClans/**'
7-
- 'src/ClashOfClans.Tests.Unit/**'
6+
- "src/ClashOfClans/**"
7+
- "src/ClashOfClans.Tests.Unit/**"
88
branches:
99
- main
1010
- develop
1111
pull_request:
1212
paths:
13-
- 'src/ClashOfClans/**'
14-
- 'src/ClashOfClans.Tests.Unit/**'
13+
- "src/ClashOfClans/**"
14+
- "src/ClashOfClans.Tests.Unit/**"
1515

1616
jobs:
1717
build:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
21-
- name: Setup .NET
22-
uses: actions/setup-dotnet@v3
23-
with:
24-
dotnet-version: '6.0.x'
20+
- uses: actions/checkout@v3
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v3
23+
with:
24+
dotnet-version: "7.0.x"
2525

26-
- name: Unit Tests
27-
working-directory: src
28-
run: dotnet test --filter FullyQualifiedName~ClashOfClans.Tests.Unit
26+
- name: Unit Tests
27+
working-directory: src
28+
run: dotnet test --filter FullyQualifiedName~ClashOfClans.Tests.Unit

build/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Patch: Backwards compatible bug fixes only
77
# -Suffix (optional): a hyphen followed by a string denoting a pre-release version (rc1, rc2, etc.)
88

9-
8.5.0-rc1
9+
8.5.0-rc2

src/ClashOfClans.App/ClashOfClans.App.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="ClashOfClans" Version="8.5.0-rc1" />
10+
<PackageReference Include="ClashOfClans" Version="8.5.0-rc2" />
1111
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
1212
</ItemGroup>
1313

src/ClashOfClans.Models/ClashOfClans.Models.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
55
<LangVersion>8.0</LangVersion>
66
<EmbedUntrackedSources>true</EmbedUntrackedSources>
77
</PropertyGroup>

src/ClashOfClans/ClashOfClans.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
55
<LangVersion>8.0</LangVersion>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<NuspecFile>ClashOfClans.nuspec</NuspecFile>
@@ -22,8 +22,8 @@
2222
</ItemGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
26-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
25+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
26+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
2727
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
2828
</ItemGroup>
2929

src/ClashOfClans/ClashOfClans.nuspec

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
<group targetFramework="netstandard2.1">
2222
<dependency id="Newtonsoft.Json" version="13.0.1" exclude="Build,Analyzers" />
2323
</group>
24-
<group targetFramework="netcoreapp3.1">
24+
<group targetFramework="net6.0">
25+
<dependency id="Newtonsoft.Json" version="13.0.1" exclude="Build,Analyzers" />
26+
</group>
27+
<group targetFramework="net7.0">
2528
<dependency id="Newtonsoft.Json" version="13.0.1" exclude="Build,Analyzers" />
2629
</group>
2730
</dependencies>
@@ -35,8 +38,11 @@
3538
<file src="bin\Release\netstandard2.1\*.dll" target="lib\netstandard2.1" />
3639
<file src="bin\Release\netstandard2.1\*.pdb" target="lib\netstandard2.1" />
3740
<file src="bin\Release\netstandard2.1\ClashOfClans.xml" target="lib\netstandard2.1" />
38-
<file src="bin\Release\netcoreapp3.1\*.dll" target="lib\netcoreapp3.1" />
39-
<file src="bin\Release\netcoreapp3.1\*.pdb" target="lib\netcoreapp3.1" />
40-
<file src="bin\Release\netcoreapp3.1\ClashOfClans.xml" target="lib\netcoreapp3.1" />
41+
<file src="bin\Release\net6.0\*.dll" target="lib\net6.0" />
42+
<file src="bin\Release\net6.0\*.pdb" target="lib\net6.0" />
43+
<file src="bin\Release\net6.0\ClashOfClans.xml" target="lib\net6.0" />
44+
<file src="bin\Release\net7.0\*.dll" target="lib\net7.0" />
45+
<file src="bin\Release\net7.0\*.pdb" target="lib\net7.0" />
46+
<file src="bin\Release\net7.0\ClashOfClans.xml" target="lib\net7.0" />
4147
</files>
4248
</package>

0 commit comments

Comments
 (0)