Skip to content

Commit f2f0445

Browse files
📦 Upgrade to .NET 8
1 parent 1e47144 commit f2f0445

File tree

16 files changed

+161
-175
lines changed

16 files changed

+161
-175
lines changed

.github/workflows/build.yml

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
1-
name: Build
2-
3-
on:
4-
pull_request:
5-
branches: [ main ]
6-
paths-ignore:
7-
- '.scripts/**'
8-
- .gitignore
9-
- CODE_OF_CONDUCT.md
10-
- LICENSE
11-
- README.md
12-
13-
workflow_call:
14-
inputs:
15-
build-artifacts:
16-
type: boolean
17-
required: true
18-
default: false
19-
20-
jobs:
21-
build:
22-
23-
runs-on: ubuntu-latest
24-
25-
steps:
26-
- uses: actions/checkout@v3
27-
name: Checkout code
28-
29-
- name: Cache NuGet packages
30-
uses: actions/cache@v3
31-
with:
32-
path: ~/.nuget/packages
33-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
34-
restore-keys: |
35-
${{ runner.os }}-nuget-
36-
37-
#if (!UseApiOnly)
38-
- name: Install Node & cache npm packages
39-
uses: actions/setup-node@v3
40-
with:
41-
node-version: '18.x'
42-
cache: 'npm'
43-
cache-dependency-path: src/Web/ClientApp/package-lock.json
44-
#endif
45-
46-
- name: Install .NET
47-
uses: actions/setup-dotnet@v3
48-
49-
- name: Restore solution
50-
run: dotnet restore
51-
52-
- name: Build solution
53-
run: dotnet build --no-restore --configuration Release
54-
55-
- name: Test solution
56-
run: dotnet test --no-build --configuration Release --filter "FullyQualifiedName!~AcceptanceTests"
57-
58-
- name: Publish website
59-
if: ${{ inputs.build-artifacts == true }}
60-
run: |
61-
dotnet publish --configuration Release --runtime win-x86 --self-contained --output ./publish
62-
cd publish
63-
zip -r ./publish.zip .
64-
working-directory: ./src/Web/
65-
66-
- name: Upload website artifact (website)
67-
if: ${{ inputs.build-artifacts == true }}
68-
uses: actions/upload-artifact@v3
69-
with:
70-
name: website
71-
path: ./src/Web/publish/publish.zip
72-
if-no-files-found: error
73-
74-
- name: Create EF Core migrations bundle
75-
if: ${{ inputs.build-artifacts == true }}
76-
run: |
77-
dotnet new tool-manifest
78-
dotnet tool install dotnet-ef --prerelease
79-
dotnet ef migrations bundle --configuration Release -p ./src/Infrastructure/ -s ./src/Web/ -o efbundle.exe
80-
zip -r ./efbundle.zip efbundle.exe
81-
env:
82-
SkipNSwag: True
83-
84-
- name: Upload EF Core migrations bundle artifact (efbundle)
85-
if: ${{ inputs.build-artifacts == true }}
86-
uses: actions/upload-artifact@v3
87-
with:
88-
name: efbundle
89-
path: ./efbundle.zip
90-
if-no-files-found: error
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths-ignore:
7+
- '.scripts/**'
8+
- .gitignore
9+
- CODE_OF_CONDUCT.md
10+
- LICENSE
11+
- README.md
12+
13+
workflow_call:
14+
inputs:
15+
build-artifacts:
16+
type: boolean
17+
required: true
18+
default: false
19+
20+
jobs:
21+
build:
22+
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
name: Checkout code
28+
29+
- name: Cache NuGet packages
30+
uses: actions/cache@v3
31+
with:
32+
path: ~/.nuget/packages
33+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
34+
restore-keys: |
35+
${{ runner.os }}-nuget-
36+
37+
#if (!UseApiOnly)
38+
- name: Install Node & cache npm packages
39+
uses: actions/setup-node@v3
40+
with:
41+
node-version: '18.x'
42+
cache: 'npm'
43+
cache-dependency-path: src/Web/ClientApp/package-lock.json
44+
#endif
45+
46+
- name: Install .NET
47+
uses: actions/setup-dotnet@v3
48+
49+
- name: Restore solution
50+
run: dotnet restore
51+
52+
- name: Build solution
53+
run: dotnet build --no-restore --configuration Release
54+
55+
- name: Test solution
56+
run: dotnet test --no-build --configuration Release --filter "FullyQualifiedName!~AcceptanceTests"
57+
58+
- name: Publish website
59+
if: ${{ inputs.build-artifacts == true }}
60+
run: |
61+
dotnet publish --configuration Release --runtime win-x86 --self-contained --output ./publish
62+
cd publish
63+
zip -r ./publish.zip .
64+
working-directory: ./src/Web/
65+
66+
- name: Upload website artifact (website)
67+
if: ${{ inputs.build-artifacts == true }}
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: website
71+
path: ./src/Web/publish/publish.zip
72+
if-no-files-found: error
73+
74+
- name: Create EF Core migrations bundle
75+
if: ${{ inputs.build-artifacts == true }}
76+
run: |
77+
dotnet new tool-manifest
78+
dotnet tool install dotnet-ef
79+
dotnet ef migrations bundle --configuration Release -p ./src/Infrastructure/ -s ./src/Web/ -o efbundle.exe
80+
zip -r ./efbundle.zip efbundle.exe
81+
env:
82+
SkipNSwag: True
83+
84+
- name: Upload EF Core migrations bundle artifact (efbundle)
85+
if: ${{ inputs.build-artifacts == true }}
86+
uses: actions/upload-artifact@v3
87+
with:
88+
name: efbundle
89+
path: ./efbundle.zip
90+
if-no-files-found: error

CleanArchitecture.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<metadata>
44

55
<id>Clean.Architecture.Solution.Template</id>
6-
<version>8.0.0-preview.7.2</version>
6+
<version>8.0.0</version>
77
<title>Clean Architecture Solution Template</title>
88
<authors>JasonTaylorDev</authors>
99
<description>Clean Architecture Solution Template for .NET 8.</description>
1010
<summary>
1111
A Clean Architecture Solution Template for creating apps using Angular, React, or Web API only with ASP.NET Core.
1212
</summary>
1313
<releaseNotes>
14-
Update CICD workflow to request required permissions.
14+
Upgrade to .NET 8.0
1515
</releaseNotes>
1616

1717
<projectUrl>https://github.com/JasonTaylorDev/CleanArchitecture</projectUrl>

Directory.Packages.props

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,47 @@
44
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageVersion Include="Ardalis.GuardClauses" Version="4.0.1" />
7+
<PackageVersion Include="Ardalis.GuardClauses" Version="4.2.0" />
88
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
9-
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.2.2" />
10-
<PackageVersion Include="Azure.Identity" Version="1.10.3" />
9+
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.0" />
10+
<PackageVersion Include="Azure.Identity" Version="1.10.4" />
1111
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
12-
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
12+
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
1313
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" />
14-
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.6.0" />
14+
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.8.0" />
1515
<PackageVersion Include="MediatR" Version="12.1.1" />
16-
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0-preview.7.23375.9" />
17-
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0-preview.7.23375.9" />
18-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0-preview.6.23329.11" />
19-
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0-preview.7.23375.9" />
20-
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.0-preview.7.23375.9" />
16+
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" />
17+
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
18+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
19+
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
20+
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.0" />
2121
<!--#if (!UseApiOnly)-->
22-
<PackageVersion Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.0-preview.7.23375.9" />
22+
<PackageVersion Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.0" />
2323
<!--#endif-->
24-
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0-preview.7.23375.4" />
25-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0-preview.7.23375.4" />
24+
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
25+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
2626
<!--#if (UseSQLite)-->
27-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-preview.7.23375.4" />
27+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
2828
<!--#endif-->
2929
<!--#if (UseLocalDB)-->
30-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-preview.7.23375.4" />
30+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
3131
<!--#endif-->
32-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-preview.7.23375.4" />
33-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0-preview.7.23375.6" />
34-
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0-preview.7.23375.6" />
35-
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.0-preview.7.23375.9" />
36-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
37-
<PackageVersion Include="Moq" Version="4.18.4" />
38-
<PackageVersion Include="NSwag.AspNetCore" Version="13.19.0" />
39-
<PackageVersion Include="NSwag.MSBuild" Version="13.19.0" />
40-
<PackageVersion Include="nunit" Version="3.13.3" />
41-
<PackageVersion Include="NUnit.Analyzers" Version="3.6.1" />
32+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
33+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
34+
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
35+
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.0" />
36+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
37+
<PackageVersion Include="Moq" Version="4.20.69" />
38+
<PackageVersion Include="NSwag.AspNetCore" Version="14.0.0-preview009" />
39+
<PackageVersion Include="NSwag.MSBuild" Version="14.0.0-preview009" />
40+
<PackageVersion Include="nunit" Version="3.14.0" />
41+
<PackageVersion Include="NUnit.Analyzers" Version="3.9.0" />
4242
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
4343
<PackageVersion Include="Respawn" Version="6.1.0" />
44-
<PackageVersion Include="Testcontainers.MsSql" Version="3.3.0" />
44+
<PackageVersion Include="Testcontainers.MsSql" Version="3.6.0" />
4545
<PackageVersion Include="ZymLabs.NSwag.FluentValidation.AspNetCore" Version="0.6.2" />
4646
<!--#if(!UseApiOnly)-->
47-
<PackageVersion Include="Microsoft.Playwright" Version="1.35.0" />
47+
<PackageVersion Include="Microsoft.Playwright" Version="1.39.0" />
4848
<PackageVersion Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />
4949
<PackageVersion Include="SpecFlow.NUnit" Version="3.9.74" />
5050
<!--#endif-->

README-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CleanArchitecture
22

3-
The project was generated using the [Clean.Architecture.Solution.Template](https://github.com/jasontaylordev/CleanArchitecture) version 8.0.0-preview.7.2.
3+
The project was generated using the [Clean.Architecture.Solution.Template](https://github.com/jasontaylordev/CleanArchitecture) version 8.0.0.
44

55
## Build
66

@@ -42,7 +42,7 @@ dotnet new ca-usecase -n GetTodos -fn TodoLists -ut query -rt TodosVm
4242
If you encounter the error *"No templates or subcommands found matching: 'ca-usecase'."*, install the template and try again:
4343

4444
```bash
45-
dotnet new install Clean.Architecture.Solution.Template::8.0.0-preview.7.2
45+
dotnet new install Clean.Architecture.Solution.Template::8.0.0
4646
```
4747

4848
## Test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you find this project useful, please give it a star. Thanks! ⭐
1515

1616
The easiest way to get started is to install the [.NET template](https://www.nuget.org/packages/Clean.Architecture.Solution.Template):
1717
```
18-
dotnet new install Clean.Architecture.Solution.Template::8.0.0-preview.7.2
18+
dotnet new install Clean.Architecture.Solution.Template::8.0.0
1919
```
2020

2121
Once installed, create a new solution using the template. You can choose to use Angular, React, or create a Web API-only solution. Specify the client framework using the `-cf` or `--client-framework` option, and provide the output directory where your project will be created. Here are some examples:

global.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.100-preview.7.23376.3",
4-
"rollForward": "latestMajor",
5-
"allowPrerelease": true
3+
"version": "8.0.100",
4+
"rollForward": "latestMinor"
65
}
76
}

0 commit comments

Comments
 (0)