-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow to publish NuGet package
- Loading branch information
1 parent
ccee3a1
commit bd7051f
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
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,26 @@ | ||
name: NuGet | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
Publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
- name: Run tests | ||
run: dotnet test -c Release | ||
|
||
- name: Package | ||
run: dotnet pack -c Release | ||
|
||
- name: Publish | ||
run: dotnet nuget push src/bin/Release/SrcSet.$(echo ${{ github.ref }} | sed 's/refs\/tags\///').nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json |