Skip to content

Updates for GHP, Nuget #109

Updates for GHP, Nuget

Updates for GHP, Nuget #109

Workflow file for this run

name: Nuget CI
on:
push:
branches: [ main, release/* ]
pull_request:
branches: [ main, release/* ]
jobs:
build:
runs-on: windows-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: setup .net core sdk
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.*
- name: dotnet build
run: dotnet build RulesEngineEditor.sln --configuration Release
- name: dotnet pack
run: dotnet pack RulesEngineEditor.sln -c Release --no-build --include-source --include-symbols -o nupkg
- name: Publish NuGet packages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
shell: pwsh
run: |
echo "Packing results:"
Get-ChildItem -Recurse nupkg | Format-List -Property FullName,Length
dotnet nuget push "nupkg/*.nupkg" -s https://api.nuget.org/v3/index.json -k $env:NUGET_API_KEY --skip-duplicate