Skip to content

Upgrade to .NET 8 and latest C# (#293) #43

Upgrade to .NET 8 and latest C# (#293)

Upgrade to .NET 8 and latest C# (#293) #43

Workflow file for this run

name: Publish
on:
push:
tags: [ v* ]
env:
DOTNET_VERSION: 8.0.x
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Version
id: setup_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
- name: Pack NuGet Package
run: dotnet pack Sharprompt/Sharprompt.csproj -c Release -o ./dist -p:Version=${{ steps.setup_version.outputs.VERSION }}
- name: Publish
run: dotnet nuget push dist/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json