Publish Nuget #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Nuget | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Setup NuGet.exe for use with actions | |
uses: NuGet/[email protected] | |
- name: Restore dependencies | |
run: dotnet restore CShell.sln | |
- name: Build | |
run: dotnet build CShell.sln -c Release --no-restore | |
- name: dotnet pack | |
run: | | |
dotnet pack --no-build CShell.sln -c Release -o packages --include-symbols --property WarningLevel=0 | |
#- name: nuget pack template | |
# run: | | |
# nuget pack template/CShell.Template/CShell.Template.nuspec -OutputDirectory packages | |
- name: Publish NuGet and symbols | |
id: nuget-push | |
uses: edumserrano/nuget-push@v1 | |
with: | |
api-key: '${{ secrets.NUGET_KEY }}' | |
working-directory: 'packages' | |
fail-if-exists: false | |