Skip to content

Commit ddf77af

Browse files
committed
Add publish nuget git action
1 parent 5e2f215 commit ddf77af

File tree

4 files changed

+31
-63
lines changed

4 files changed

+31
-63
lines changed

.github/FUNDING.yml

-4
This file was deleted.

.github/workflows/build.yml

-30
This file was deleted.

.github/workflows/publish-nuget.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and publish package
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events but only for the master branch
5+
on:
6+
push:
7+
branches: [ master ]
8+
9+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10+
jobs:
11+
# This workflow contains a single job called "build"
12+
build:
13+
# The type of runner that the job will run on
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@master
18+
19+
- name: Setup .NET environment
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: '6.0.100'
23+
24+
- name: Build project
25+
run: dotnet build --configuration Release
26+
27+
- name: Generate a NuGet package
28+
run: dotnet pack --no-build -c Release -o .
29+
30+
- name: Push to GitHub package registry
31+
run: dotnet nuget push "*.nupkg" -k ${{secrets.NUGETORGTOKEN}} -s https://api.nuget.org/v3/index.json --skip-duplicate

.github/workflows/publish.yml

-29
This file was deleted.

0 commit comments

Comments
 (0)