Added a Github workflow to auto-update the Nuget package
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
name: "Deploy to Nuget.org"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --no-build --configuration Release --verbosity normal
|
||||
|
||||
- name: Pack
|
||||
run: dotnet pack --no-build --configuration Release InterfaceGenerator/InterfaceGenerator.csproj --output .
|
||||
|
||||
- name: Push to nuget.org
|
||||
run: dotnet nuget push *.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate
|
||||
Reference in New Issue
Block a user