Skip to content

Publish nugets

Publish nugets #7

Workflow file for this run

name: Publish nugets
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Pack with dotnet
run: ./build.sh --no-color pack
shell: bash
- name: Publish to NuGet
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package to NuGet...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
done