Skip to content

Commit 673f077

Browse files
committed
Split package artifacts by platform in workflows
1 parent a44b07e commit 673f077

2 files changed

Lines changed: 86 additions & 9 deletions

File tree

.github/workflows/package-branches.yml

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
"file_version=$fileVersion" >> $env:GITHUB_OUTPUT
6464
"informational_version=$infoVersion" >> $env:GITHUB_OUTPUT
6565
"branch_label=$branchLabel" >> $env:GITHUB_OUTPUT
66-
"artifact_name=branch-tool-packages-$branchLabel-${{ github.run_number }}" >> $env:GITHUB_OUTPUT
66+
"artifact_suffix=$branchLabel-${{ github.run_number }}" >> $env:GITHUB_OUTPUT
6767
6868
- name: Restore
6969
run: dotnet restore CosmosDBShell.sln --configfile .github/nuget.github.config
@@ -161,14 +161,21 @@ jobs:
161161
run: |
162162
$summary = $env:GITHUB_STEP_SUMMARY
163163
$version = '${{ steps.version.outputs.package_version }}'
164-
$artifactName = '${{ steps.version.outputs.artifact_name }}'
164+
$artifactSuffix = '${{ steps.version.outputs.artifact_suffix }}'
165165
$branchName = '${{ github.ref_name }}'
166166
$lines = @(
167167
'## Branch tool packages',
168168
'',
169169
('- Branch: `' + $branchName + '`'),
170170
('- Preview version: `' + $version + '`'),
171-
('- Artifact: `' + $artifactName + '`'),
171+
'',
172+
'Artifacts:',
173+
('- `CosmosDBShell-pointer-' + $artifactSuffix + '`'),
174+
('- `CosmosDBShell-win-x64-' + $artifactSuffix + '`'),
175+
('- `CosmosDBShell-linux-x64-' + $artifactSuffix + '`'),
176+
('- `CosmosDBShell-linux-arm64-' + $artifactSuffix + '`'),
177+
('- `CosmosDBShell-osx-x64-' + $artifactSuffix + '`'),
178+
('- `CosmosDBShell-osx-arm64-' + $artifactSuffix + '`'),
172179
'',
173180
'Download the artifact, extract the `.nupkg` files to a local folder, then install one of these packages:',
174181
'',
@@ -183,9 +190,44 @@ jobs:
183190
)
184191
$lines -join "`n" | Out-File -FilePath $summary -Encoding utf8 -Append
185192
186-
- name: Upload branch tool packages
193+
- name: Upload pointer package
194+
uses: actions/upload-artifact@v4
195+
with:
196+
name: CosmosDBShell-pointer-${{ steps.version.outputs.artifact_suffix }}
197+
path: out/nupkg/CosmosDBShell.${{ steps.version.outputs.package_version }}.nupkg
198+
if-no-files-found: error
199+
200+
- name: Upload win-x64 package
201+
uses: actions/upload-artifact@v4
202+
with:
203+
name: CosmosDBShell-win-x64-${{ steps.version.outputs.artifact_suffix }}
204+
path: out/nupkg/CosmosDBShell.win-x64.${{ steps.version.outputs.package_version }}.nupkg
205+
if-no-files-found: error
206+
207+
- name: Upload linux-x64 package
208+
uses: actions/upload-artifact@v4
209+
with:
210+
name: CosmosDBShell-linux-x64-${{ steps.version.outputs.artifact_suffix }}
211+
path: out/nupkg/CosmosDBShell.linux-x64.${{ steps.version.outputs.package_version }}.nupkg
212+
if-no-files-found: error
213+
214+
- name: Upload linux-arm64 package
215+
uses: actions/upload-artifact@v4
216+
with:
217+
name: CosmosDBShell-linux-arm64-${{ steps.version.outputs.artifact_suffix }}
218+
path: out/nupkg/CosmosDBShell.linux-arm64.${{ steps.version.outputs.package_version }}.nupkg
219+
if-no-files-found: error
220+
221+
- name: Upload osx-x64 package
222+
uses: actions/upload-artifact@v4
223+
with:
224+
name: CosmosDBShell-osx-x64-${{ steps.version.outputs.artifact_suffix }}
225+
path: out/nupkg/CosmosDBShell.osx-x64.${{ steps.version.outputs.package_version }}.nupkg
226+
if-no-files-found: error
227+
228+
- name: Upload osx-arm64 package
187229
uses: actions/upload-artifact@v4
188230
with:
189-
name: ${{ steps.version.outputs.artifact_name }}
190-
path: out/nupkg
231+
name: CosmosDBShell-osx-arm64-${{ steps.version.outputs.artifact_suffix }}
232+
path: out/nupkg/CosmosDBShell.osx-arm64.${{ steps.version.outputs.package_version }}.nupkg
191233
if-no-files-found: error

.github/workflows/package-unsigned.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,44 @@ jobs:
185185
path: TestResults
186186
if-no-files-found: ignore
187187

188-
- name: Upload unsigned artifacts
188+
- name: Upload pointer package
189189
uses: actions/upload-artifact@v4
190190
with:
191-
name: unsigned-build-artifacts
192-
path: out
191+
name: CosmosDBShell-pointer-${{ steps.version.outputs.package_version }}
192+
path: out/nupkg/CosmosDBShell.${{ steps.version.outputs.package_version }}.nupkg
193+
if-no-files-found: error
194+
195+
- name: Upload win-x64 package
196+
uses: actions/upload-artifact@v4
197+
with:
198+
name: CosmosDBShell-win-x64-${{ steps.version.outputs.package_version }}
199+
path: out/nupkg/CosmosDBShell.win-x64.${{ steps.version.outputs.package_version }}.nupkg
200+
if-no-files-found: error
201+
202+
- name: Upload linux-x64 package
203+
uses: actions/upload-artifact@v4
204+
with:
205+
name: CosmosDBShell-linux-x64-${{ steps.version.outputs.package_version }}
206+
path: out/nupkg/CosmosDBShell.linux-x64.${{ steps.version.outputs.package_version }}.nupkg
207+
if-no-files-found: error
208+
209+
- name: Upload linux-arm64 package
210+
uses: actions/upload-artifact@v4
211+
with:
212+
name: CosmosDBShell-linux-arm64-${{ steps.version.outputs.package_version }}
213+
path: out/nupkg/CosmosDBShell.linux-arm64.${{ steps.version.outputs.package_version }}.nupkg
214+
if-no-files-found: error
215+
216+
- name: Upload osx-x64 package
217+
uses: actions/upload-artifact@v4
218+
with:
219+
name: CosmosDBShell-osx-x64-${{ steps.version.outputs.package_version }}
220+
path: out/nupkg/CosmosDBShell.osx-x64.${{ steps.version.outputs.package_version }}.nupkg
221+
if-no-files-found: error
222+
223+
- name: Upload osx-arm64 package
224+
uses: actions/upload-artifact@v4
225+
with:
226+
name: CosmosDBShell-osx-arm64-${{ steps.version.outputs.package_version }}
227+
path: out/nupkg/CosmosDBShell.osx-arm64.${{ steps.version.outputs.package_version }}.nupkg
193228
if-no-files-found: error

0 commit comments

Comments
 (0)