Skip to content

NuGet Publish

NuGet Publish #1

Workflow file for this run

name: NuGet Publish
on:
workflow_dispatch:
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore NuGet packages
run: |
dotnet restore
nuget-push:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
project:
- DanfeNet
steps:
- uses: actions/checkout@v2
- name: Build and publish NuGet package
run: |
cd ${{ matrix.project }}
dotnet build -c release
dotnet pack -c release --output="nuget"
cd nuget
dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate