-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.24 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish release package
on:
release:
types: [ published ]
permissions:
contents: write
packages: write
jobs:
publish-nupkg:
name: Publish NuGet package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Create NuGet Package
run: dotnet pack /p:Version=${{ github.event.release.name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: 'TEKSteamClient.${{ github.event.release.name }}.nupkg'
path: 'bin/Release/TEKSteamClient.${{ github.event.release.name }}.*upkg'
- name: Upload to GitHub release
uses: softprops/action-gh-release@v2
with:
files: 'bin/Release/TEKSteamClient.${{ github.event.release.name }}.*upkg'
- name: Publish to NuGet
run: dotnet nuget push bin/Release/TEKSteamClient.${{ github.event.release.name }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish to GitHub Packages
run: dotnet nuget push bin/Release/TEKSteamClient.${{ github.event.release.name }}.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/Nuclearistt/index.json