1010
1111jobs :
1212 build :
13- name : Build, Test, and Upload Builds
14- runs-on : ubuntu-latest
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ os : [ ubuntu-latest, windows-latest ]
17+ name : Build, Test, and Upload Builds (${{ matrix.os }})
18+ runs-on : ${{ matrix.os }}
1519 steps :
1620 - uses : actions/checkout@v3
1721 - name : Setup .NET
@@ -21,25 +25,32 @@ jobs:
2125
2226 - name : Set VERSION variable from tag (for tag pushes)
2327 if : ${{ contains(github.ref, 'refs/tags') }}
28+ shell : bash
2429 run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
2530
2631 - name : Set VERSION variable from tag (for normal commits)
32+ shell : bash
2733 if : ${{ !contains(github.ref, 'refs/tags') }}
2834 run : echo "VERSION=0.0.0" >> $GITHUB_ENV
2935
3036 - name : Print VERSION variable for debugging
37+ shell : bash
3138 run : echo "$VERSION"
3239
3340 - name : Restore
3441 run : dotnet restore
3542
3643 - name : Publish for Linux x64
44+ if : matrix.os == 'ubuntu-latest'
3745 run : dotnet publish -c Release -r linux-x64 --self-contained Refresher /p:Version=${VERSION}
3846
3947 - name : Publish for Windows x64
40- run : dotnet publish -c Release -r win-x64 --self-contained Refresher /p:Version=${VERSION}
48+ if : matrix.os == 'windows-latest'
49+ shell : bash
50+ run : dotnet publish -c Release -r win-x64 --self-contained Refresher //p:Version=${VERSION}
4151
4252 - name : Upload Linux x64 build
53+ if : matrix.os == 'ubuntu-latest'
43544455 with :
4556 name : " Refresher for Linux x64"
4859 retention-days : 30
4960
5061 - name : Upload Windows x64 build
62+ if : matrix.os == 'windows-latest'
51635264 with :
5365 name : " Refresher for Windows x64"
54- path : " Refresher/bin/Release/net7.0/win-x64/publish/"
66+ path : " Refresher/bin/Release/net7.0-windows /win-x64/publish/"
5567 if-no-files-found : error
5668 retention-days : 30
0 commit comments