Skip to content

Commit 077a112

Browse files
committed
dotnet package action
1 parent 211f00d commit 077a112

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Upload dotnet package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
permissions:
12+
packages: write
13+
contents: read
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: '6.0.x' # SDK Version to use.
21+
- name: Build
22+
working-directory: ./src
23+
run: dotnet build --configuration Release .
24+
- name: Create the package
25+
working-directory: ./src
26+
run: dotnet pack --configuration Release .
27+
- name: Publish the package to nuget.org
28+
working-directory: ./src
29+
run: dotnet nuget push FileTypeInterrogator/bin/Release/FileTypeInterrogator.*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
30+
env:
31+
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}

0 commit comments

Comments
 (0)