-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 832 Bytes
/
Copy pathdeploy.yml
File metadata and controls
33 lines (27 loc) · 832 Bytes
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
30
31
32
33
name: Publish .NET Template (via .nuspec) to NuGet
on:
push:
branches:
- prod
jobs:
publish:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install NuGet CLI
uses: nuget/setup-nuget@v1
- name: Pack template with nuget
run: |
nuget pack EntityCoreTemplate.nuspec -OutputDirectory ./nupkg
echo "=== nupkg filelari ==="
dir ./nupkg
- name: Push NuGet package
shell: powershell
run: |
$nupkg = Get-ChildItem -Path "./nupkg" -Filter "*.nupkg" | Select-Object -First 1
if ($nupkg) {
& $env:NUGET push $nupkg.FullName -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}
} else {
Write-Error "nupkg fayli topilmadi"
}