Skip to content

Commit 44cb7d0

Browse files
authored
Update .NET workflow to use environment variable
1 parent 372aaab commit 44cb7d0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/dotnet.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# This workflow will build a .NET project
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
33

4-
name: .NET
4+
name: Build & test
55

66
on:
77
push:
88
branches: [ "master" ]
9-
pull_request:
10-
branches: [ "master" ]
9+
10+
env:
11+
NET_VERSION: 10.x
1112

1213
jobs:
1314
build:
@@ -16,10 +17,10 @@ jobs:
1617

1718
steps:
1819
- uses: actions/checkout@v4
19-
- name: Setup .NET
20+
- name: Setup .NET ${{ env.NET_VERSION }}
2021
uses: actions/setup-dotnet@v4
2122
with:
22-
dotnet-version: 10.0.x
23+
dotnet-version: ${{ env.NET_VERSION }}
2324
- name: Restore dependencies
2425
run: dotnet restore
2526
- name: Build

0 commit comments

Comments
 (0)