-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
# | ||
# http://go.microsoft.com/fwlink/?LinkId=248929 | ||
|
||
name: 'Publish to NuGet.org' | ||
|
||
on: workflow_dispatch | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
DESKTOP_NUGET: directxtk_desktop_2019 | ||
WIN10_NUGET: directxtk_desktop_win10 | ||
UWP_NUGET: directxtk_uwp | ||
|
||
jobs: | ||
deploy: | ||
runs-on: windows-latest | ||
environment: production | ||
steps: | ||
- uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2 | ||
|
||
- name: 'Fetch XAudio2Redist from NuGet.org' | ||
run: nuget install Microsoft.XAudio2.Redist -Source https://api.nuget.org/v3/index.json -OutputDirectory ${{ github.workspace }} | ||
|
||
- name: 'Fetch NuGet package 1 from Release view' | ||
run: nuget install ${{ env.DESKTOP_NUGET }} -Source %URL% -OutputDirectory ${{ github.workspace }} | ||
env: | ||
URL: ${{ vars.ADO_FEED_URL }} | ||
|
||
- name: 'Fetch NuGet package 2 from Release view' | ||
run: nuget install ${{ env.WIN10_NUGET }} -Source %URL% -OutputDirectory ${{ github.workspace }} | ||
env: | ||
URL: ${{ vars.ADO_FEED_URL }} | ||
|
||
- name: 'Fetch NuGet package 3 from Release view' | ||
run: nuget install ${{ env.UWP_NUGET }} -Source %URL% -OutputDirectory ${{ github.workspace }} | ||
env: | ||
URL: ${{ vars.ADO_FEED_URL }} | ||
|
||
- name: 'Verify NuGet packages' | ||
working-directory: ${{ github.workspace }} | ||
run: for /R %1 in (directxtk*.nupkg) do nuget verify -All -Signatures -Verbosity quiet %1 | ||
|
||
- name: 'Publish NuGet packages' | ||
working-directory: ${{ github.workspace }} | ||
run: for /R %1 in (directxtk*.nupkg) do nuget push %1 -Source https://api.nuget.org/v3/index.json -ApiKey %APIKEY% -SkipDuplicate | ||
env: | ||
APIKEY: ${{ secrets.NUGET_APIKEY }} |