Skip to content

Commit a09105e

Browse files
committed
ci: fix YAML indentation, job layout, and pack if/fi; target merge-dev2-to-master
1 parent 0271d8b commit a09105e

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI (.NET)
22

33
on:
44
pull_request:
5-
branches: [ master ]
5+
branches: [ merge-dev2-to-master ]
66
push:
7-
branches: [ master ]
7+
branches: [ merge-dev2-to-master ]
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
@@ -25,31 +25,34 @@ jobs:
2525
dotnet-version: 8.0.x
2626

2727
- name: Restore
28-
run: dotnet restore AiDotNet.sln
28+
run: dotnet restore AiDotNet.sln
29+
2930
- name: Verify code style (dotnet format)
3031
run: |
3132
dotnet tool update -g dotnet-format || dotnet tool install -g dotnet-format
3233
export PATH="$PATH:$HOME/.dotnet/tools"
3334
dotnet format AiDotNet.sln --verify-no-changes || (echo "Run 'dotnet format' locally to fix style issues." && exit 1)
35+
3436
build:
35-
name: Build
36-
strategy:
37-
matrix:
38-
dotnet: ['6.0.x', '8.0.x']
39-
fail-fast: false
37+
name: Build
4038
runs-on: ubuntu-latest
4139
timeout-minutes: 15
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
dotnet: ['6.0.x', '8.0.x']
4244
steps:
4345
- name: Checkout code
4446
uses: actions/checkout@v4
4547

46-
- name: Setup .NET 8.0.x
48+
- name: Setup .NET ${{ matrix.dotnet }}
4749
uses: actions/setup-dotnet@v4
4850
with:
49-
dotnet-version: 8.0.x
51+
dotnet-version: ${{ matrix.dotnet }}
5052

5153
- name: Restore
52-
run: dotnet restore AiDotNet.sln
54+
run: dotnet restore AiDotNet.sln
55+
5356
- name: Build
5457
run: dotnet build AiDotNet.sln --configuration Release --no-restore
5558

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ jobs:
4949
run: |
5050
if [ -f "src/AiDotNet.csproj" ]; then
5151
dotnet pack src/AiDotNet.csproj -c Release -o out /p:PackageVersion=${{ steps.version.outputs.version }}
52-
fi\n\n - name: Verify TFMs in package (net46, net6.0, net8.0)
52+
else
53+
echo "src/AiDotNet.csproj not found; skipping pack"
54+
fi
55+
56+
- name: Verify TFMs in package (net46, net6.0, net8.0)
5357
run: |
5458
set -e
5559
shopt -s nullglob
@@ -64,9 +68,6 @@ jobs:
6468
echo "$files" | grep -qE '^lib/net6\.0/.+\.dll$' || { echo "Missing net6.0 lib in package"; exit 1; }
6569
echo "$files" | grep -qE '^lib/net8\.0/.+\.dll$' || { echo "Missing net8.0 lib in package"; exit 1; }
6670
done
67-
else
68-
echo "src/AiDotNet.csproj not found; skipping pack"
69-
fi
7071
7172
- name: Upload package artifact
7273
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)