Skip to content

NuGet Package

NuGet Package #105

Workflow file for this run

name: "NuGet Package"
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Set up GitHub Packages authentication
run: |
dotnet nuget update source "GitHub" --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Restore dependencies
run: dotnet restore
- name: Clear packages folder
run: |
mkdir -p ./packages
rm -f ./packages/*
- name: Pack
run: |
dotnet pack ./Jinaga/ -c Release -o ./packages /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
dotnet pack ./Jinaga.UnitTest/ -c Release -o ./packages /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
dotnet pack ./Jinaga.Notebooks/ -c Release -o ./packages /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
dotnet pack ./Jinaga.Store.SQLite/ -c Release -o ./packages /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
dotnet pack ./Jinaga.Maui/ -c Release -o ./packages /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
dotnet pack ./Jinaga.Tool/ -c Release -o ./packages /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
- name: Publish NuGet to GitHub Packages registry
run: dotnet nuget push ./packages/*.nupkg ./packages/*.snupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/Jinaga/index.json --skip-duplicate