-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow to publish nuget packages
- Loading branch information
1 parent
ebdbb17
commit c170fb1
Showing
5 changed files
with
36 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: NuGet Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and Publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup .NET Core SDK | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.400' # change this to match your version of .NET Core SDK | ||
|
||
- name: Restore packages | ||
run: dotnet restore | ||
|
||
- name: Build package | ||
run: dotnet pack -c Release | ||
|
||
- name: Publish package | ||
uses: nuget/setup-nuget@v1 | ||
with: | ||
nuget-api-key: ${{ secrets.GITHUB_TOKEN }} | ||
nuget-version: '6.3.0.128' | ||
run: | | ||
dotnet nuget push *.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/fredyyy998/index.json |
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
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
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