Skip to content

Commit 98d942d

Browse files
committed
ci/release: fix test job matrix + indentation; correct Codecov step; fix release triggers, job if, and download artifacts for GitHub Release
1 parent bde6901 commit 98d942d

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,20 @@ jobs:
9797
- name: Checkout code
9898
uses: actions/checkout@v4
9999

100-
- name: Setup .NET 8.0.x
100+
- name: Setup .NET ${{ matrix.dotnet }}
101101
uses: actions/setup-dotnet@v4
102102
with:
103-
dotnet-version: 8.0.x
103+
dotnet-version: ${{ matrix.dotnet }}
104104

105105
- name: Restore
106-
run: dotnet restore AiDotNet.sln
106+
run: dotnet restore AiDotNet.sln
107107
- name: Run tests with coverage
108108
run: |
109109
dotnet test AiDotNet.sln --configuration Release --collect:"XPlat Code Coverage" --results-directory ./TestResults
110110
111-
- name: Upload coverage to Codecov (only uploads if secret set)\n uses: codecov/codecov-action@v4
111+
- name: Upload coverage to Codecov (only if token set)
112+
if: ${{ secrets.CODECOV_TOKEN != '' }}
113+
uses: codecov/codecov-action@v4
112114
with:
113115
token: ${{ secrets.CODECOV_TOKEN }}
114116
files: |

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release (.NET)
33
on:
44
push:
55
branches:
6-
- master
6+
- merge-dev2-to-master
77

88
permissions:
99
contents: write
@@ -80,7 +80,7 @@ jobs:
8080
name: Publish to NuGet
8181
runs-on: ubuntu-latest
8282
needs: build-test-pack
83-
if: secrets.NUGET_API_KEY != ''
83+
if: ${{ secrets.NUGET_API_KEY != '' }}
8484
steps:
8585
- name: Download package
8686
uses: actions/download-artifact@v4
@@ -101,6 +101,12 @@ jobs:
101101
runs-on: ubuntu-latest
102102
needs: build-test-pack
103103
steps:
104+
- name: Download package
105+
uses: actions/download-artifact@v4
106+
with:
107+
name: nuget-out-${{ github.sha }}
108+
path: out/
109+
104110
- name: Create Release
105111
uses: softprops/action-gh-release@v2
106112
with:

0 commit comments

Comments
 (0)