Skip to content

Commit 4bf0cb1

Browse files
committed
Fix upload path and add package cleanup policy
Signed-off-by: Victor Chang <[email protected]>
1 parent e44c16e commit 4bf0cb1

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,13 @@ jobs:
383383
popd
384384
dir -r ~/release
385385
386+
- name: Upload CLI
387+
uses: actions/[email protected]
388+
with:
389+
name: artifacts
390+
path: ~/release
391+
retention-days: 7
392+
386393
- name: Package API
387394
env:
388395
PACKAGEDIR: '${{ github.workspace }}/nupkg/'
@@ -392,22 +399,13 @@ jobs:
392399
dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ env.NUGETVER }}
393400
ls -lR $PACKAGEDIR
394401
working-directory: ./src/Api
395-
396-
- name: Upload CLI
397-
uses: actions/[email protected]
398-
with:
399-
name: artifacts
400-
path: ~/release
401-
retention-days: 7
402402

403403
- name: Upload Nuget
404404
if: ${{ matrix.os == 'ubuntu-latest' }}
405405
uses: actions/[email protected]
406-
env:
407-
PACKAGEDIR: '${{ github.workspace }}/nupkg'
408406
with:
409407
name: nuget
410-
path: $PACKAGEDIR/*.nupkg
408+
path: ~/nupkg
411409
retention-days: 30
412410

413411
- name: Log in to the Container registry

.github/workflows/package-cleanup.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: Cleanup Pre-release Packages
5+
6+
on:
7+
schedule:
8+
- cron: "0 0 * * *"
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/delete-package-versions@v4
18+
name: Monai.Deploy.InformaticsGateway.Api
19+
with:
20+
package-name: 'Monai.Deploy.InformaticsGateway.Api'
21+
package-type: nuget
22+
min-versions-to-keep: 10
23+
delete-only-pre-release-versions: "true"
24+
25+
- uses: actions/delete-package-versions@v4
26+
name: monai-deploy-informatics-gateway
27+
with:
28+
package-name: 'monai-deploy-informatics-gateway'
29+
package-type: container
30+
min-versions-to-keep: 10
31+
delete-only-pre-release-versions: "true"
32+

0 commit comments

Comments
 (0)