v4.54.4 #48
Workflow file for this run
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
name: Deploy NuGet | |
on: | |
release: | |
types: [ published ] | |
env: | |
# Stop wasting time caching packages | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
# Disable sending usage data to Microsoft | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
# Project name to pack and publish | |
PROJECT_NAME: Graph.Community | |
# Official NuGet Feed settings | |
NUGET_FEED: https://api.nuget.org/v3/index.json | |
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }} | |
jobs: | |
deploy: | |
if: github.event_name == 'release' | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
- name: Create Release NuGet package | |
run: | | |
$VERSION=($env:GITHUB_REF -split "/" | select -skip 2).TrimStart("v") | |
echo Version: $VERSION | |
dotnet pack -v normal -c Release --include-source -p:PackageVersion=$VERSION -p:Version=$VERSION -o nupkg src/$env:PROJECT_NAME.csproj | |
- name: Push to NuGet Feed | |
run: dotnet nuget push **\*.nupkg --source $env:NUGET_FEED --skip-duplicate --api-key $env:NUGET_APIKEY |