Skip to content

Commit

Permalink
Add nuget.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenan-kajkus committed Nov 23, 2023
1 parent e9b6e8d commit 9adaa69
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to nuget

on:
push:
tags:
- 'v*'

env:
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace}}\output
NUGET_SOURCE_URL: ${{ github.workspace}}\output

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration Release

- name: Pack
run: dotnet pack --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{github.ref_name}} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY}}

- name: Push
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\*.nupkg -k -s ${{secrets.NUGET_AUTH_TOKEN}} ${{ env.NUGET_SOURCE_URL}}

0 comments on commit 9adaa69

Please sign in to comment.