Skip to content

Commit e65924b

Browse files
authored
Merge pull request #11 from sylac/develop
publish pkg separately
2 parents 584035a + b377534 commit e65924b

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/ci-cd.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,26 @@ jobs:
6262
- name: Package
6363
run: dotnet pack -c Release --no-build --output nupkgs
6464

65-
- name: Publish
66-
run: dotnet nuget push nupkgs/ -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
65+
- name: Publish Mvvm.Core
66+
if: endsWith(github.ref, 'mvvm-core')
67+
shell: pwsh
68+
run: |
69+
$file = Get-ChildItem -Path nupkgs -Filter "Sylac.Mvvm.Maui*.nupkg" | Select-Object -First 1
70+
if ($file) { dotnet nuget push $file.FullName -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} || true }
71+
else { Write-Output "No package file found for Mvvm.Core" }
72+
73+
- name: Publish Mvvm.Generators
74+
if: endsWith(github.ref, 'mvvm-generators')
75+
shell: pwsh
76+
run: |
77+
$file = Get-ChildItem -Path nupkgs -Filter "Sylac.Mvvm.Generators*.nupkg" | Select-Object -First 1
78+
if ($file) { dotnet nuget push $file.FullName -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} || true }
79+
else { Write-Output "No package file found for Mvvm.Generators" }
80+
81+
- name: Publish Mvvm.Maui
82+
if: endsWith(github.ref, 'mvvm-maui')
83+
shell: pwsh
84+
run: |
85+
$file = Get-ChildItem -Path nupkgs -Filter "Sylac.Mvvm.Maui*.nupkg" | Select-Object -First 1
86+
if ($file) { dotnet nuget push $file.FullName -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} || true }
87+
else { Write-Output "No package file found for Mvvm.Maui" }

0 commit comments

Comments
 (0)