Skip to content

Update dotnet-nuget-publish.yml #11

Update dotnet-nuget-publish.yml

Update dotnet-nuget-publish.yml #11

name: Build and Publish NuGet
on:
push:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0'
- name: Restore dependencies
run: dotnet restore
working-directory: ./NewZipAPI
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: ./NewZipAPI
- name: Pack
run: dotnet pack --configuration Release --no-build --output ../nupkgs
working-directory: ./NewZipAPI
- name: Push to GitHub Packages
run: dotnet nuget push "D:\a\NewZipAPI.net\NewZipAPI.net\nupkgs\*.nupkg" --source "https://nuget.pkg.github.com/kyle079/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
shell: pwsh