Skip to content

Commit

Permalink
Add nuget publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajidur78 committed Nov 17, 2023
1 parent 6545579 commit 23940e9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "master" ]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Pack
working-directory: ./Source/SharpNeedle
run: dotnet pack
- name: Publish
working-directory: ./Source/SharpNeedle
run: dotnet nuget push **/*.nupkg -s $NUGET_SOURCE -k $NUGET_AUTH_TOKEN --skip-duplicate
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
NUGET_SOURCE: https://api.nuget.org/v3/index.json

0 comments on commit 23940e9

Please sign in to comment.