Skip to content

Commit 6b359d7

Browse files
committed
GitHub Actions
1 parent ab5f460 commit 6b359d7

File tree

2 files changed

+15
-30
lines changed

2 files changed

+15
-30
lines changed

.github/workflows/dotnet-build.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
16-
1715
steps:
1816
- uses: actions/checkout@v4
1917
- name: Setup .NET
@@ -24,3 +22,18 @@ jobs:
2422
run: dotnet restore ./src/SteamWebAPI2.sln
2523
- name: Build
2624
run: dotnet build ./src/SteamWebAPI2.sln --no-restore
25+
26+
publish:
27+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
28+
needs: build
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Setup .NET
33+
uses: actions/setup-dotnet@v4
34+
with:
35+
dotnet-version: 8.0.x
36+
- name: Pack
37+
run: dotnet pack ./src/SteamWebAPI2/SteamWebAPI2.csproj -c Release --no-build --output .
38+
- name: Publish
39+
run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json -n --skip-duplicate

.github/workflows/dotnet-publish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)