3.0.0-Beta.5 #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package Release | |
on: | |
release: | |
types: [ published ] | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
publish-nupkg: | |
name: Publish NuGet Package | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Create NuGet Package | |
run: dotnet pack --configuration Release SteamKit2/SteamKit2/SteamKit2.csproj /p:Version=${{ github.event.release.tag_name }} | |
- name: Upload NuGet Package as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SteamKit2-${{ github.event.release.tag_name }}.nupkg | |
path: 'SteamKit2/SteamKit2/bin/Release/SteamKit2.${{ github.event.release.tag_name }}.nupkg' | |
- name: Upload NuGet Package to GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload "${{ github.event.release.tag_name }}" "SteamKit2/SteamKit2/bin/Release/SteamKit2.${{ github.event.release.tag_name }}.nupkg" | |
- name: Publish NuGet Package to NuGet Gallery | |
run: | | |
dotnet nuget push SteamKit2/SteamKit2/bin/Release/SteamKit2.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
- name: Publish NuGet Package to GitHub Packages | |
run: | | |
dotnet nuget push SteamKit2/SteamKit2/bin/Release/SteamKit2.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/SteamRE/index.json |