Skip to content

Use new GITHUB_REF_NAME #5

Use new GITHUB_REF_NAME

Use new GITHUB_REF_NAME #5

Workflow file for this run

name: Build and Publish Steamworks.NET NuGet Package
on:
push:
tags:
- '*'
jobs:
build-and-publish:
name: Build and Publish NuGet Package
runs-on: windows-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Setup .NET environment
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
# Setup NuGet client
- name: Setup NuGet client
run: |
choco install nuget -y
nuget update -self
# Build and Package binaries
- name: Build and Package binaries
run: |
dotnet build -t:BatchBuild Standalone/Steamworks.NET.Standard.sln /p:Version=$GITHUB_REF_NAME
nuget pack Standalone/Steamworks.NET.nuspec -OutputDirectory bin\ -Version $GITHUB_REF_NAME
# Publish the NuGet package
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
nuget push bin\*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey $NUGET_API_KEY