Skip to content

PushToNuget

PushToNuget #7

Workflow file for this run

name: PushToNuget
env:
NUGET_DIR: '${{ github.workspace }}/nuget'
on:
workflow_dispatch:
jobs:
build:
name: Push packages to NuGet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9'
- name: Pack Blazor.Diagrams.Core
working-directory: src/Blazor.Diagrams.Core
run: 'dotnet pack -p:GeneratePackageOnBuild=false --configuration Release --output ${{ env.NUGET_DIR }}'
- name: Pack Blazor.Diagrams
working-directory: src/Blazor.Diagrams
run: 'dotnet pack -p:GeneratePackageOnBuild=false --configuration Release --output ${{ env.NUGET_DIR }}'
- name: Pack Blazor.Diagrams.Algorithms
working-directory: src/Blazor.Diagrams.Algorithms
run: 'dotnet pack -p:GeneratePackageOnBuild=false --configuration Release --output ${{ env.NUGET_DIR }}'
- name: Push
run: >-
for i in $(find ${{ env.NUGET_DIR }} -type f -name "*.nupkg");
do
echo "File: ${i} \n";
dotnet nuget push $i --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
done