Skip to content

Commit 905aa14

Browse files
authored
Update ci.yml
1 parent 414db26 commit 905aa14

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
mkdir ~/release
190190
dotnet publish --self-contained -c ${{ env.BUILD_CONFIG }} -r linux-x64 -o cli/ src/CLI/Monai.Deploy.InformaticsGateway.CLI.csproj
191191
pushd cli && rm *.pdb
192-
zip -r ~/release/mig-cli-linux-x64.zip *
192+
zip -r ~/release/mig-cli-${{ env.GitVersion_SemVer }}-linux-x64.zip *
193193
popd
194194
ls -lR ~/release
195195
@@ -199,14 +199,14 @@ jobs:
199199
mkdir ~/release
200200
dotnet publish --self-contained -c ${{ env.BUILD_CONFIG }} -r win-x64 -o cli/ src/CLI/Monai.Deploy.InformaticsGateway.CLI.csproj
201201
pushd cli && rm *.pdb
202-
Compress-Archive -Path * -DestinationPath ~/release/mig-cli-windows-x64.zip
202+
Compress-Archive -Path * -DestinationPath ~/release/mig-cli-${{ env.GitVersion_SemVer }}-win-x64.zip
203203
popd
204204
dir -r ~/release
205205
206206
- name: Upload CLI
207207
uses: actions/[email protected]
208208
with:
209-
name: cli
209+
name: artifacts
210210
path: ~/release
211211
retention-days: 7
212212

@@ -225,7 +225,7 @@ jobs:
225225
with:
226226
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
227227
tags: |
228-
type=raw,value=${{env.GitVersion_SemVer}}
228+
type=raw,value=${{ env.GitVersion_SemVer }}
229229
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
230230
231231
- name: Build and push Docker image
@@ -301,21 +301,21 @@ jobs:
301301
run: |
302302
mkdir ~/release
303303
pushd docs/_site
304-
zip -r ~/release/mig-docs.zip *
304+
zip -r ~/release/mig-docs-${{ env.GitVersion_SemVer }}.zip *
305305
popd
306306
ls -lR ~/release
307307
308308
- name: Upload docs
309309
uses: actions/[email protected]
310310
with:
311-
name: docs
311+
name: artifacts
312312
path: ~/release
313313
retention-days: 7
314314

315315
release:
316316
if: ${{ contains(github.ref, 'refs/heads/main') }}
317317
runs-on: ubuntu-latest
318-
needs: [build, unit-test, docs]
318+
needs: [calc-version, build, unit-test, docs]
319319
env:
320320
SEMVER: ${{ needs.calc-version.outputs.semVer }}
321321
PRERELEASELABEL: ${{ needs.calc-version.outputs.preReleaseLabel }}
@@ -327,11 +327,10 @@ jobs:
327327
fetch-depth: 0
328328

329329
- uses: actions/download-artifact@v2
330-
with:
331-
path: release/
330+
id: download
332331

333332
- name: List artifacts
334-
run: ls -lR release/
333+
run: ls -ldR ${{steps.download.outputs.download-path}}/**/*
335334

336335
- name: Extract owner and repo
337336
uses: jungwinter/split@v1
@@ -352,11 +351,11 @@ jobs:
352351
owner: ${{ steps.repo.outputs._0 }}
353352
repository: ${{ steps.repo.outputs._1 }}
354353
milestone: ${{ env.MAJORMINORPATCH }}
355-
name: "Release ${{ env.MAJORMINORPATCH }}"
354+
name: "Release v${{ env.MAJORMINORPATCH }}"
356355
assets: |
357-
release/cli/mig-cli-linux-x64.zip
358-
release/cli/mig-cli-windows-x64.zip
359-
release/docs/mig-docs.zip
356+
artifacts/mig-cli-${{ env.SEMVER }}-linux-x64.zip
357+
artifacts/mig-cli-${{ env.SEMVER }}-win-x64.zip
358+
artifacts/mig-docs-${{ env.SEMVER }}.zip
360359
361360
- name: Publish release with GitReleaseManager
362361
uses: gittools/actions/gitreleasemanager/[email protected]

0 commit comments

Comments
 (0)