Skip to content

Commit 91b5e91

Browse files
committed
Fix releasing NuGets
1 parent 966943e commit 91b5e91

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/dotnet-build.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -287,26 +287,25 @@ jobs:
287287
name: packages
288288
path: ./packages
289289

290-
- name: Remove MediaElement package if that is not being released
291-
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-mediaelement')
290+
- name: Remove packages for MediaElement-only release
291+
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-mediaelement')
292292
run: |
293-
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_ -notmatch "CommunityToolkit.Maui.MediaElement" } | Remove-Item -Force
293+
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_.Name -notmatch "CommunityToolkit\.Maui\.MediaElement" } | Remove-Item -Force
294294
295-
- name: Remove Camera package if that is not being released
296-
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-camera')
295+
- name: Remove packages for Camera-only release
296+
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-camera')
297297
run: |
298-
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_ -notmatch "CommunityToolkit.Maui.Camera" } | Remove-Item -Force
298+
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_.Name -notmatch "CommunityToolkit\.Maui\.Camera" } | Remove-Item -Force
299299
300-
- name: Remove Maps package if that is not being released
301-
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-maps')
300+
- name: Remove packages for Maps-only release
301+
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-maps')
302302
run: |
303-
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_ -notmatch "CommunityToolkit.Maui.Maps" } | Remove-Item -Force
303+
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_.Name -notmatch "CommunityToolkit\.Maui\.Maps" } | Remove-Item -Force
304304
305-
- name: Remove Core & Main package if that is not being released
305+
- name: Remove packages for Core & Main release
306306
if: startsWith(github.ref, 'refs/tags/') && (!endsWith(github.ref, '-mediaelement') && !endsWith(github.ref, '-camera') && !endsWith(github.ref, '-maps'))
307307
run: |
308-
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_ -notmatch "CommunityToolkit.Maui" } | Remove-Item -Force
309-
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_ -notmatch "CommunityToolkit.Maui.Core" } | Remove-Item -Force
308+
Get-ChildItem -Path "${{ github.workspace }}/packages" -Recurse -Filter "*.nupkg" | Where-Object { $_.Name -match "CommunityToolkit\.Maui\.(Camera|MediaElement|Maps)" } | Remove-Item -Force
310309
311310
- name: Install Signing Tool
312311
run: dotnet tool install --tool-path ./tools sign --version 0.9.1-beta.23356.1
@@ -349,7 +348,7 @@ jobs:
349348
dotnet-version: ${{ env.TOOLKIT_NET_VERSION }}
350349
dotnet-quality: 'ga'
351350

352-
- name: Download signed packages for ${{ matrix.platform }}
351+
- name: Download signed packages
353352
uses: actions/download-artifact@v4
354353
with:
355354
name: signed-packages

0 commit comments

Comments
 (0)