Skip to content

Commit

Permalink
dotnet package action
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1face committed Jan 18, 2022
1 parent 211f00d commit 077a112
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/dotnet-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Upload dotnet package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x' # SDK Version to use.
- name: Build
working-directory: ./src
run: dotnet build --configuration Release .
- name: Create the package
working-directory: ./src
run: dotnet pack --configuration Release .
- name: Publish the package to nuget.org
working-directory: ./src
run: dotnet nuget push FileTypeInterrogator/bin/Release/FileTypeInterrogator.*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}

0 comments on commit 077a112

Please sign in to comment.