Skip to content

Workflow file for this run

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@v1
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