Skip to content

v0.1.3

v0.1.3 #17

Workflow file for this run

# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to NuGet in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/sd-st/publishing-test-csharp/actions/workflows/publish-nuget.yml
name: Publish to NuGet
on:
workflow_dispatch:
release:
types: [published]
jobs:
publish:
name: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Build and pack
run: dotnet pack
--configuration Release
--output "${{github.workspace}}/artifacts/packages"
- name: Publish package to nuget.org
run: dotnet nuget push
${{ github.workspace }}/artifacts/packages/*.nupkg
--source https://api.nuget.org/v3/index.json
--api-key $NUGET_API_KEY
--skip-duplicate
env:
NUGET_API_KEY: ${{ secrets.PUBLISHING_TEST_NUGET_API_KEY || secrets.NUGET_API_KEY }}