NuGet Generation #17
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: NuGet Generation | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- prereleased | |
- released | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Update NuGet packages | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Setup .NET Core @ Latest | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Generate NuGet packages | |
run: dotnet pack ./src/ -c Release | |
- name: Push packages to registry | |
run: | | |
cd ./packages | |
dotnet nuget push "*.nupkg" -k ${NUGET_API_KEY} -s https://api.nuget.org/v3/index.json --skip-duplicate | |
env: | |
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}} |