Skip to content

Commit 173803e

Browse files
authored
Upgrading .NET version to .net8 (#553)
* upgrade: upgrade .net version to .net 8.0 * upgrade: change github action yml * upgrade: upgrade base test version * update: update props * Update: change base test version
1 parent 04b17e8 commit 173803e

File tree

36 files changed

+215
-221
lines changed

36 files changed

+215
-221
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,30 @@ name: Build
22

33
on:
44
push:
5-
branches: [ dev, main, master, '**' ]
5+
branches: [dev, main, master, "**"]
66
pull_request:
7-
branches: [ dev, main, master ]
7+
branches: [dev, main, master]
88

99
jobs:
10-
11-
windows:
12-
name: build on ${{ matrix.os }}
10+
windows:
11+
name: build on ${{ matrix.os }}
1312
runs-on: ${{ matrix.os }}
1413
strategy:
1514
matrix:
16-
os: [ windows-latest ]
17-
15+
os: [windows-latest]
16+
1817
steps:
19-
- uses: actions/checkout@v4
20-
- name: Setup .NET SDK 6.0.x
21-
uses: actions/setup-dotnet@v3
22-
with:
23-
dotnet-version: 6.0.x
18+
- uses: actions/checkout@v4
19+
- name: Setup .NET SDK 8.0.x
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 8.0.x
23+
24+
- name: Show dotnet Version
25+
run: |
26+
dotnet --list-sdks
27+
dotnet --list-runtimes
2428
25-
- name: Show dotnet Version
26-
run: |
27-
dotnet --list-sdks
28-
dotnet --list-runtimes
29-
30-
- name: Build with dotnet
31-
run: |
32-
dotnet build --configuration Release D:\a\EasyCaching\EasyCaching\EasyCaching.sln
29+
- name: Build with dotnet
30+
run: |
31+
dotnet build --configuration Release D:\a\EasyCaching\EasyCaching\EasyCaching.sln

.github/workflows/buildandtest.yml

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ name: Build&Test
22

33
on:
44
push:
5-
branches: [ dev, main, master, '**' ]
5+
branches: [dev, main, master, "**"]
66
pull_request:
7-
branches: [ dev, main, master ]
7+
branches: [dev, main, master]
88

99
jobs:
10-
11-
linux:
12-
name: build and test on ${{ matrix.os }}
10+
linux:
11+
name: build and test on ${{ matrix.os }}
1312
runs-on: ${{ matrix.os }}
1413
strategy:
1514
matrix:
16-
os: [ ubuntu-latest ]
15+
os: [ubuntu-latest]
1716

1817
services:
1918
redis6379:
@@ -27,36 +26,36 @@ jobs:
2726
redis6388:
2827
image: redis
2928
ports:
30-
- 6388:6379
29+
- 6388:6379
3130
memcached1:
3231
image: bitnami/memcached
3332
ports:
34-
- 11211:11211
33+
- 11211:11211
3534
memcached2:
3635
image: bitnami/memcached
3736
ports:
38-
- 11212:11211
37+
- 11212:11211
3938

4039
steps:
41-
- uses: actions/checkout@v4
42-
- name: Setup .NET SDK 6.0.x
43-
uses: actions/setup-dotnet@v3
44-
with:
45-
dotnet-version: 6.0.x
46-
47-
- name: Show dotnet Version
48-
run: |
49-
dotnet --list-sdks
50-
dotnet --list-runtimes
51-
52-
- name: Show docker info
53-
run: |
54-
docker ps -a
55-
56-
- name: Build with dotnet
57-
run: |
58-
dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
59-
60-
- name: Run tests on net6.0
61-
run: |
62-
dotnet test --framework=net6.0 /home/runner/work/EasyCaching/EasyCaching/test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj
40+
- uses: actions/checkout@v4
41+
- name: Setup .NET SDK 8.0.x
42+
uses: actions/setup-dotnet@v3
43+
with:
44+
dotnet-version: 8.0.x
45+
46+
- name: Show dotnet Version
47+
run: |
48+
dotnet --list-sdks
49+
dotnet --list-runtimes
50+
51+
- name: Show docker info
52+
run: |
53+
docker ps -a
54+
55+
- name: Build with dotnet
56+
run: |
57+
dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
58+
59+
- name: Run tests on net8.0
60+
run: |
61+
dotnet test --framework=net8.0 /home/runner/work/EasyCaching/EasyCaching/test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj

.github/workflows/release.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
name: Release
22

33
on:
4-
push:
5-
branches:
4+
push:
5+
branches:
66
- dev
77
- master
88
- main
99

1010
jobs:
11-
build_artifact:
11+
build_artifact:
1212
name: Build and upload artifact
1313
runs-on: ubuntu-latest
14-
14+
1515
steps:
16-
- uses: actions/checkout@v4
17-
- name: Setup .NET Core
18-
uses: actions/setup-dotnet@v3
19-
with:
20-
dotnet-version: 6.0.x
21-
- name: Build with dotnet
22-
run: dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
23-
- name: Pack with dotnet
24-
run: dotnet pack /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln --version-suffix alpha`date +%Y%m%d%H%M%S` -o /home/runner/work/nugetpkgs -c Release --no-build
25-
- name: Upload artifact
26-
uses: actions/upload-artifact@v3
27-
with:
28-
name: nugetpkgs
29-
path: /home/runner/work/nugetpkgs
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET Core
18+
uses: actions/setup-dotnet@v3
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Build with dotnet
22+
run: dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
23+
- name: Pack with dotnet
24+
run: dotnet pack /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln --version-suffix alpha`date +%Y%m%d%H%M%S` -o /home/runner/work/nugetpkgs -c Release --no-build
25+
- name: Upload artifact
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: nugetpkgs
29+
path: /home/runner/work/nugetpkgs
3030

3131
release_nuget:
32-
name: Release to Nuget
33-
needs: build_artifact
34-
runs-on: ubuntu-latest
35-
36-
steps:
37-
- name: Download build artifacts
38-
uses: actions/download-artifact@v3
39-
with:
40-
name: nugetpkgs
41-
path: nugetpkgs
42-
- name: list nugetpkgs
43-
run: ls nugetpkgs
44-
- name: Release
45-
run: |
46-
for file in nugetpkgs/*.nupkg
47-
do
48-
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
49-
done
32+
name: Release to Nuget
33+
needs: build_artifact
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Download build artifacts
38+
uses: actions/download-artifact@v3
39+
with:
40+
name: nugetpkgs
41+
path: nugetpkgs
42+
- name: list nugetpkgs
43+
run: ls nugetpkgs
44+
- name: Release
45+
run: |
46+
for file in nugetpkgs/*.nupkg
47+
do
48+
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
49+
done
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
name: Release_Stable
22

33
on:
4-
push:
5-
tags:
6-
- '**'
7-
4+
push:
5+
tags:
6+
- "**"
7+
88
jobs:
9-
build_artifact:
9+
build_artifact:
1010
name: Build and upload artifact
1111
runs-on: ubuntu-latest
12-
12+
1313
steps:
14-
- uses: actions/checkout@v4
15-
- name: Setup .NET Core
16-
uses: actions/setup-dotnet@v3
17-
with:
18-
dotnet-version: 6.0.x
19-
- name: Build with dotnet
20-
run: dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
21-
- name: Pack with dotnet
22-
run: dotnet pack /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln -o /home/runner/work/nugetpkgs -c Release --no-build
23-
- name: Upload artifact
24-
uses: actions/upload-artifact@v3
25-
with:
26-
name: nugetpkgs
27-
path: /home/runner/work/nugetpkgs
14+
- uses: actions/checkout@v4
15+
- name: Setup .NET Core
16+
uses: actions/setup-dotnet@v3
17+
with:
18+
dotnet-version: 8.0.x
19+
- name: Build with dotnet
20+
run: dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
21+
- name: Pack with dotnet
22+
run: dotnet pack /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln -o /home/runner/work/nugetpkgs -c Release --no-build
23+
- name: Upload artifact
24+
uses: actions/upload-artifact@v3
25+
with:
26+
name: nugetpkgs
27+
path: /home/runner/work/nugetpkgs
2828

2929
release_nuget:
30-
name: Release to Nuget
31-
needs: build_artifact
32-
runs-on: ubuntu-latest
33-
34-
steps:
35-
- name: Download build artifacts
36-
uses: actions/download-artifact@v3
37-
with:
38-
name: nugetpkgs
39-
path: nugetpkgs
40-
- name: list nugetpkgs
41-
run: ls nugetpkgs
42-
- name: Release
43-
run: |
44-
for file in nugetpkgs/*.nupkg
45-
do
46-
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
47-
done
30+
name: Release to Nuget
31+
needs: build_artifact
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Download build artifacts
36+
uses: actions/download-artifact@v3
37+
with:
38+
name: nugetpkgs
39+
path: nugetpkgs
40+
- name: list nugetpkgs
41+
run: ls nugetpkgs
42+
- name: Release
43+
run: |
44+
for file in nugetpkgs/*.nupkg
45+
do
46+
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
47+
done

0 commit comments

Comments
 (0)