Skip to content

Commit f3bd615

Browse files
committed
Ensure VERSION_PROPERTY is in .nupkg name when provided
1 parent bec0919 commit f3bd615

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ jobs:
158158
working-directory: ./tooling/Scripts/
159159
run: ./PackEachExperiment.ps1 -date ${{ env.VERSION_DATE }}${{ env.VERSION_PROPERTY != '' && format(' -postfix {0}', env.VERSION_PROPERTY) || '' }}
160160

161+
- name: Validate package names
162+
if: ${{ env.VERSION_PROPERTY != '' }}
163+
run: powershell -version 5.1 -command "Get-ChildItem -Path '**/*.nupkg' | ForEach-Object { if ($_.Name -notmatch '${{ env.VERSION_PROPERTY }}') { throw 'Nupkg name is missing trailing VERSION_PROPERTY' + $_.Name } }" -ErrorAction Stop
164+
161165
# Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config)
162166
- name: Push PR packages (if not fork)
163167
if: ${{ env.IS_PR == 'true' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}

0 commit comments

Comments
 (0)