Skip to content

Commit

Permalink
Add create nuget on build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jerikso authored Sep 5, 2022
1 parent 3f702f1 commit 567fc2c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Nuget

on:
release:
types: [published]

jobs:
release:

runs-on: windows-2019

steps:

- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: microsoft/setup-msbuild@v1

- uses: NuGet/setup-nuget@v1

- name: Restore NuGet packages
working-directory: ./Px.Search.Abstractions/
run: nuget restore


- name: Build the application
working-directory: ./Px.Search.Abstractions/
run: msbuild /p:Configuration=Release

- name: Deploy to Nuget
working-directory: ./Px.Search.Abstractions/
run: |
$package = Get-ChildItem -Recurse -Filter *.nupkg
nuget push $package $env:nuget_api_key -src https://nuget.org
env:
nuget_api_key: ${{ secrets.NUGET_API_KEY }}

0 comments on commit 567fc2c

Please sign in to comment.