Skip to content

Commit 5813630

Browse files
committed
add publisg to nugets
1 parent 9cdf66c commit 5813630

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

.github/workflows/dotnet-core-desktop_Common_Controls.yml

+33-6
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,37 @@ jobs:
5959
run: |
6060
rm ./Installer/Installer_TemporaryKey.pfx
6161
62+
# Publish Artifacts
63+
- name: 'Publish Artifacts'
64+
uses: actions/[email protected]
65+
with:
66+
name: 'artifactory'
67+
path: ./Analogy.CommonControls/bin/${{ matrix.configuration }}
68+
push-nuget:
69+
name: 'Push NuGet Packages'
70+
needs: build
71+
if: ${{ github.event_name == 'push'}}
72+
runs-on: windows-latest
73+
steps:
74+
- name: 'Download Artifact'
75+
uses: actions/download-artifact@v1
76+
with:
77+
name: 'artifactory'
78+
- name: 'Dotnet NuGet Push'
79+
run: |
80+
Get-ChildItem .\artifactory -Filter *.nupkg |
81+
Where-Object { !$_.Name.Contains('preview') } |
82+
ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.Analogy_CommonControls_APIKEY}} }
83+
shell: pwsh
84+
85+
- name: Setup NuGet.exe for use with actions
86+
uses: NuGet/[email protected]
87+
88+
- name: Add private GitHub registry to NuGet
89+
run: nuget sources add -name "GPR" -Source https://nuget.pkg.github.com/Analogy-LogViewer/index.json -Username Analogy-LogViewer -Password ${{ secrets.Analogy_CommonControls_APIKEY }}
6290

63-
# Publish Artifacts
64-
# - name: 'Publish Artifacts'
65-
# uses: actions/[email protected]
66-
# with:
67-
# name: Analogy_Artifacts_${{ matrix.configuration }}
68-
# path: ./Analogy/bin/${{ matrix.configuration }}
91+
- name: 'Dotnet NuGet Push to github registry'
92+
run: |
93+
Get-ChildItem .\artifactory -Filter *.nupkg |
94+
Where-Object { !$_.Name.Contains('preview') } |
95+
ForEach-Object { nuget push $_ -Source "GPR" -SkipDuplicate }

0 commit comments

Comments
 (0)