Skip to content

Commit 6a11930

Browse files
committed
update actions
1 parent a5aade2 commit 6a11930

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

.github/workflows/dotnet-unit-test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ jobs:
1212
os: [ubuntu-latest, macos-latest, windows-2022]
1313
fail-fast: false
1414
runs-on: ${{ matrix.os }}
15+
env:
16+
DOTNET_LIBRARY: dotnet
1517
steps:
1618
- uses: actions/checkout@v3
1719
- uses: actions/setup-dotnet@v3
1820
with:
19-
dotnet-version: 7.0.3xx # https://github.com/microsoft/testfx/issues/1733
21+
dotnet-version: 8
2022
- name: Restore dependencies
21-
run: dotnet restore StandardLibrary
23+
run: dotnet restore ${{ env.DOTNET_LIBRARY }}
2224
- name: Build
23-
run: dotnet build --no-restore StandardLibrary
25+
run: dotnet build --no-restore ${{ env.DOTNET_LIBRARY }}
2426
- name: Test
25-
run: dotnet test --no-build --verbosity normal StandardLibrary
27+
run: dotnet test --no-build --verbosity normal ${{ env.DOTNET_LIBRARY }}

.github/workflows/publish-nuget-package.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ on:
88

99
jobs:
1010
build:
11-
1211
runs-on: ubuntu-latest
13-
12+
env:
13+
DOTNET_LIBRARY: dotnet
1414
steps:
1515
- uses: actions/checkout@v3
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v3
1818
with:
19-
dotnet-version: 6.0.x
19+
dotnet-version: 8
2020
- name: Restore dependencies
21-
run: dotnet restore StandardLibrary
21+
run: dotnet restore ${{ env.DOTNET_LIBRARY }}
2222
- name: Pack
2323
run: |
24-
cd StandardLibrary/MyPackage
24+
cd ${{ env.DOTNET_LIBRARY }}/MyPackage
2525
dotnet pack -c Release -o out
2626
- name: Publish
2727
env:
2828
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
29-
run: dotnet nuget push ./StandardLibrary/MyPackage/out/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
29+
run: dotnet nuget push ./${{ env.DOTNET_LIBRARY }}/MyPackage/out/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
# Gradle cache directory
3030
.gradle/
3131

32+
# Cursor
33+
.cursor
34+
3235
# Autogenerated VS/MD/Consulo solution and project files
3336
ExportedObj/
3437
.consulo/

StandardLibrary/.gitignore renamed to dotnet/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ nupkg/
1111
# Rider
1212
.idea
1313

14+
# Cursor
15+
.cursor
16+
1417
# User-specific files
1518
*.suo
1619
*.user

0 commit comments

Comments
 (0)