Skip to content

Commit 059dd72

Browse files
committed
GitHub Actions
1 parent 8ca16c7 commit 059dd72

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/dotnet-build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
pull_request:
1111
branches: [ "master" ]
1212

13+
env:
14+
IS_PUSH_TAG: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
15+
1316
jobs:
1417
build:
1518
runs-on: ubuntu-latest
@@ -21,11 +24,14 @@ jobs:
2124
dotnet-version: 8.0.x
2225
- name: Restore dependencies
2326
run: dotnet restore ./src/SteamWebAPI2.sln
24-
- name: Build
27+
- name: Build (Debug)
2528
run: dotnet build ./src/SteamWebAPI2.sln --no-restore
29+
- name: Build (Release)
30+
if: $IS_PUSH_TAG
31+
run: dotnet build ./src/SteamWebAPI2.sln -c Release --no-restore
2632
- name: Pack
27-
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
33+
if: $IS_PUSH_TAG
2834
run: dotnet pack ./src/SteamWebAPI2/SteamWebAPI2.csproj -c Release --no-build --output .
2935
- name: Publish
30-
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
36+
if: $IS_PUSH_TAG
3137
run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json -n --skip-duplicate

0 commit comments

Comments
 (0)