-
Notifications
You must be signed in to change notification settings - Fork 17
29 lines (24 loc) · 1.02 KB
/
PublishNuget.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: publish nuget
on:
push:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Build with dotnet
run: dotnet build "EncodingNormalior\dotnetCampus.EncodingNormalior.csproj" --configuration Release
- name: Install Nuget
run: |
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$targetNugetExe = "nuget.exe"
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
- name: Add private GitHub registry to NuGet
run: |
.\nuget sources add -name github -Source https://nuget.pkg.github.com/ORGANIZATION_NAME/index.json -Username ORGANIZATION_NAME -Password ${{ secrets.GITHUB_TOKEN }}
- name: Push generated package to GitHub registry
run: |
.\nuget push .\bin\release\*.nupkg -Source github -SkipDuplicate
.\nuget push .\bin\release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbols