Skip to content

Commit 4052571

Browse files
Fix CI build for .NET 7 (#5)
* Set up .NET 7 during CI/CD. * Fix the yaml typo * Update .NET SDK in Dockerfile.
1 parent f209780 commit 4052571

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ jobs:
1111
timeout-minutes: 15
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
15+
- name: Set up .NET 7
16+
uses: actions/setup-dotnet@v3
17+
with:
18+
dotnet-version: '7'
1519
- name: Build
1620
run: docker build --target build .
1721
- name: Test

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ jobs:
77
timeout-minutes: 15
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v2
10+
uses: actions/checkout@v3
11+
- name: Set up .NET 7
12+
uses: actions/setup-dotnet@v3
13+
with:
14+
dotnet-version: '7'
1115
- name: Set VERSION variable from tag
1216
run: echo "VERSION=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
1317
- name: Build

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
22
WORKDIR /source
33

44
# copy csproj and restore as distinct layers

0 commit comments

Comments
 (0)