Skip to content

Commit b842b25

Browse files
authored
release/0.5.1 (#524)
Address CVE-2024-38229, CVE-2024-35264 #521
1 parent dd2c648 commit b842b25

File tree

74 files changed

+107619
-27224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+107619
-27224
lines changed

.github/.gitversion.yml

100644100755
+14-6
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,29 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
workflow: GitHubFlow/v1
1516
assembly-versioning-scheme: MajorMinorPatchTag
17+
assembly-file-versioning-scheme: MajorMinorPatchTag
1618
mode: ContinuousDelivery
1719
branches:
1820
main:
19-
tag: ''
21+
label: ''
22+
regex: ^main$
2023
release:
21-
tag: rc
24+
label: rc
25+
regex: ^releases?[/-](?<BranchName>.+)
2226
develop:
23-
tag: beta
27+
label: beta
28+
increment: Patch
29+
regex: ^develop$
2430
feature:
25-
tag: alpha.{BranchName}
31+
label: alpha.{BranchName}
32+
regex: ^features?[/-](?<BranchName>.+)
2633
pull-request:
27-
tag: pr
34+
label: pr
35+
increment: Patch
36+
regex: ^(pull|pull\-requests|pr)[/-]
2837

2938
ignore:
3039
sha: []
3140
merge-message-formats: {}
32-
next-version: 0.3.17

.github/workflows/ci.yml

+73-56
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,27 @@ jobs:
3737

3838
outputs:
3939
semVer: ${{ steps.gitversion.outputs.semVer }}
40-
preReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}
41-
majorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}
42-
nuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
40+
preReleaseLabel: ${{ steps.gitversion.outputs.PreReleaseLabel }}
41+
majorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}
42+
nuGetVersionV2: ${{ steps.gitversion.outputs.MajorMinorPatch }}
4343

4444
steps:
4545
- uses: actions/checkout@v4
4646
with:
4747
fetch-depth: 0
4848

49-
- uses: actions/setup-dotnet@v3
49+
- uses: actions/setup-dotnet@v4
5050
with:
5151
dotnet-version: "8.0.x"
5252

53-
- name: Install GitVersion
54-
run: dotnet tool install --global GitVersion.Tool
53+
- name: Setup GitVersion
54+
uses: gittools/actions/gitversion/[email protected]
55+
with:
56+
versionSpec: '6.0.x'
5557

5658
- name: Determine Version
5759
id: gitversion
58-
uses: gittools/actions/gitversion/execute@v0.10.2
60+
uses: gittools/actions/gitversion/execute@v3.1.11
5961
with:
6062
useConfigFile: true
6163
updateAssemblyInfo: true
@@ -66,7 +68,7 @@ jobs:
6668
run: cat src/AssemblyInfo.cs
6769

6870
- name: Upload AssemblyInfo
69-
uses: actions/upload-artifact@v3.1.2
71+
uses: actions/upload-artifact@v4.6.2
7072
if: always()
7173
with:
7274
name: assembly-info
@@ -86,20 +88,20 @@ jobs:
8688
with:
8789
fetch-depth: 0
8890

89-
- uses: actions/setup-dotnet@v3
91+
- uses: actions/setup-dotnet@v4
9092
with:
9193
dotnet-version: "8.0.x"
9294

9395
- name: Enable NuGet cache
94-
uses: actions/cache@v3.3.2
96+
uses: actions/cache@v4.2.3
9597
with:
9698
path: ~/.nuget/packages
9799
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
98100
restore-keys: |
99101
${{ runner.os }}-nuget
100102
101103
- name: Initialize CodeQL
102-
uses: github/codeql-action/init@v2
104+
uses: github/codeql-action/init@v3
103105
with:
104106
languages: csharp
105107

@@ -112,7 +114,7 @@ jobs:
112114
working-directory: ./src
113115

114116
- name: Perform CodeQL Analysis
115-
uses: github/codeql-action/analyze@v2
117+
uses: github/codeql-action/analyze@v3
116118

117119
analyze:
118120
runs-on: ubuntu-latest
@@ -127,7 +129,7 @@ jobs:
127129
with:
128130
fetch-depth: 0
129131

130-
- uses: actions/setup-dotnet@v3
132+
- uses: actions/setup-dotnet@v4
131133
with:
132134
dotnet-version: "8.0.x"
133135

@@ -141,7 +143,7 @@ jobs:
141143
cache: yes
142144

143145
- name: Enable NuGet cache
144-
uses: actions/cache@v3.3.2
146+
uses: actions/cache@v4.2.3
145147
with:
146148
path: ~/.nuget/packages
147149
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -184,17 +186,17 @@ jobs:
184186
- 27017:27017
185187
steps:
186188
- name: Set up JDK 17
187-
uses: actions/setup-java@v3
189+
uses: actions/setup-java@v4
188190
with:
189191
distribution: zulu
190192
java-version: '17'
191193

192-
- uses: actions/setup-dotnet@v3
194+
- uses: actions/setup-dotnet@v4
193195
with:
194196
dotnet-version: "8.0.x"
195197

196198
- name: Enable NuGet cache
197-
uses: actions/cache@v3.3.2
199+
uses: actions/cache@v4.2.3
198200
with:
199201
path: ~/.nuget/packages
200202
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -268,12 +270,12 @@ jobs:
268270
with:
269271
fetch-depth: 0
270272

271-
- uses: actions/setup-dotnet@v3
273+
- uses: actions/setup-dotnet@v4
272274
with:
273275
dotnet-version: "8.0.x"
274276

275277
- name: Enable NuGet cache
276-
uses: actions/cache@v3.3.2
278+
uses: actions/cache@v4.2.3
277279
with:
278280
path: ~/.nuget/packages
279281
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -295,10 +297,10 @@ jobs:
295297
popd
296298
297299
- name: Upload Integration Test Results
298-
uses: actions/upload-artifact@v3.1.2
300+
uses: actions/upload-artifact@v4.6.2
299301
if: always()
300302
with:
301-
name: integration-${{ matrix.feature }}
303+
name: integration-${{ matrix.feature }}-${{ matrix.database }}
302304
path: |
303305
${{ github.workspace }}/LivingDoc.html
304306
${{ github.workspace }}/services.log
@@ -311,8 +313,8 @@ jobs:
311313
env:
312314
NUGETVER: ${{ needs.calc-version.outputs.nuGetVersionV2 }}
313315
SEMVER: ${{ needs.calc-version.outputs.semVer }}
314-
PRERELEASELABEL: ${{ needs.calc-version.outputs.preReleaseLabel }}
315-
MAJORMINORPATCH: ${{ needs.calc-version.outputs.majorMinorPatch }}
316+
PRERELEASELABEL: ${{ needs.calc-version.outputs.PreReleaseLabel }}
317+
MAJORMINORPATCH: ${{ needs.calc-version.outputs.MajorMinorPatch }}
316318
strategy:
317319
matrix:
318320
os: [ubuntu-latest]
@@ -333,12 +335,12 @@ jobs:
333335
with:
334336
fetch-depth: 0
335337

336-
- uses: actions/setup-dotnet@v3
338+
- uses: actions/setup-dotnet@v4
337339
with:
338340
dotnet-version: "8.0.x"
339341

340342
- name: Enable NuGet cache
341-
uses: actions/cache@v3.3.2
343+
uses: actions/cache@v4.2.3
342344
with:
343345
path: ~/.nuget/packages
344346
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -347,7 +349,7 @@ jobs:
347349
348350
- name: Download AssemblyInfo.cs
349351
id: download
350-
uses: actions/download-artifact@v3
352+
uses: actions/download-artifact@v4
351353
with:
352354
name: assembly-info
353355
path: src/
@@ -384,9 +386,9 @@ jobs:
384386
dir -r ~/release
385387
386388
- name: Upload CLI
387-
uses: actions/upload-artifact@v3.1.2
389+
uses: actions/upload-artifact@v4.6.2
388390
with:
389-
name: artifacts
391+
name: artifacts-cli
390392
path: ~/release
391393
retention-days: 7
392394

@@ -400,7 +402,7 @@ jobs:
400402

401403
- name: Upload Nuget
402404
if: ${{ matrix.os == 'ubuntu-latest' }}
403-
uses: actions/upload-artifact@v3.1.2
405+
uses: actions/upload-artifact@v4.6.2
404406
with:
405407
name: nuget
406408
path: ~/nupkg
@@ -479,18 +481,18 @@ jobs:
479481
runs-on: windows-latest
480482
needs: [calc-version]
481483
env:
482-
SEMVER: ${{ needs.calc-version.outputs.semVer }}
484+
SEMVER: ${{ needs.calc-version.outputs.SemVer }}
483485
steps:
484486
- uses: actions/checkout@v4
485487
with:
486488
fetch-depth: 0
487489

488-
- uses: actions/setup-dotnet@v3
490+
- uses: actions/setup-dotnet@v4
489491
with:
490492
dotnet-version: "8.0.x"
491493

492494
- name: Enable NuGet cache
493-
uses: actions/cache@v3.3.2
495+
uses: actions/cache@v4.2.3
494496
with:
495497
path: ~/.nuget/packages
496498
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -527,9 +529,9 @@ jobs:
527529
Get-ChildItem ~\release -Recurse
528530
529531
- name: Upload docs
530-
uses: actions/upload-artifact@v3.1.2
532+
uses: actions/upload-artifact@v4.6.2
531533
with:
532-
name: artifacts
534+
name: artifacts-docs
533535
path: ~/release
534536
retention-days: 7
535537

@@ -539,22 +541,22 @@ jobs:
539541
needs: [build, unit-test, integration-test]
540542
if: ${{ ! ( github.event.inputs.nuget ) && ! ( contains(github.ref, 'refs/heads/main') ) }}
541543
steps:
542-
- uses: actions/download-artifact@v3
544+
- uses: actions/download-artifact@v4
543545
id: download
544546

545547
- name: List artifacts
546548
run: ls -ldR ${{steps.download.outputs.download-path}}/**/*
547549

548-
- name: Install grp
549-
run: dotnet tool install gpr -g
550-
551-
- uses: actions/setup-dotnet@v3
550+
- uses: actions/setup-dotnet@v4
552551
env:
553552
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
554553
with:
555554
dotnet-version: "8.0.x"
556555
source-url: https://nuget.pkg.github.com/Project-MONAI/index.json
557556

557+
- name: Install grp
558+
run: dotnet tool install gpr -g
559+
558560
- name: Publish to GitHub
559561
run: gpr push '${{ steps.download.outputs.download-path }}/nuget/*.nupkg' --repository ${{ github.repository }} -k ${{ secrets.GITHUB_TOKEN }}
560562

@@ -563,30 +565,30 @@ jobs:
563565
runs-on: ubuntu-latest
564566
needs: [calc-version, unit-test, docs, integration-test, analyze]
565567
env:
566-
SEMVER: ${{ needs.calc-version.outputs.semVer }}
567-
PRERELEASELABEL: ${{ needs.calc-version.outputs.preReleaseLabel }}
568-
MAJORMINORPATCH: ${{ needs.calc-version.outputs.majorMinorPatch }}
568+
SEMVER: ${{ needs.calc-version.outputs.SemVer }}
569+
PRERELEASELABEL: ${{ needs.calc-version.outputs.PreReleaseLabel }}
570+
MAJORMINORPATCH: ${{ needs.calc-version.outputs.MajorMinorPatch }}
569571

570572
steps:
571573
- uses: actions/checkout@v4
572574
with:
573575
fetch-depth: 0
574576

575-
- uses: actions/download-artifact@v3
577+
- uses: actions/download-artifact@v4
576578
id: download
577579

578580
- name: List artifacts
579581
run: ls -ldR ${{steps.download.outputs.download-path}}/**/*
580-
581-
- name: Install grp
582-
run: dotnet tool install gpr -g
583582

584-
- uses: actions/setup-dotnet@v3
583+
- uses: actions/setup-dotnet@v4
585584
env:
586585
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
587586
with:
588587
dotnet-version: "8.0.x"
589588
source-url: https://nuget.pkg.github.com/Project-MONAI/index.json
589+
590+
- name: Install grp
591+
run: dotnet tool install gpr -g
590592

591593
- name: Publish to GitHub
592594
run: gpr push '${{ steps.download.outputs.download-path }}/nuget/*.nupkg' --repository ${{ github.repository }} -k ${{ secrets.GITHUB_TOKEN }}
@@ -617,37 +619,52 @@ jobs:
617619
publish_branch: docs
618620

619621
- name: Install GitReleaseManager
620-
uses: gittools/actions/gitreleasemanager/setup@v0.10.2
622+
uses: gittools/actions/gitreleasemanager/setup@v3.1.11
621623
with:
622-
versionSpec: "0.13.x"
624+
versionSpec: '0.18.x'
623625

624626
- name: Create release with GitReleaseManager
625-
uses: gittools/actions/gitreleasemanager/create@v0.10.2
627+
uses: gittools/actions/gitreleasemanager/create@v3.1.11
626628
with:
627629
token: ${{ secrets.GITHUB_TOKEN }}
628630
owner: ${{ steps.repo.outputs._0 }}
629631
repository: ${{ steps.repo.outputs._1 }}
630632
milestone: ${{ env.MAJORMINORPATCH }}
631633
name: "Release v${{ env.MAJORMINORPATCH }}"
632634
assets: |
633-
artifacts/mig-cli-${{ env.SEMVER }}-linux-x64.zip
634-
artifacts/mig-cli-${{ env.SEMVER }}-win-x64.zip
635-
artifacts/mig-docs-${{ env.SEMVER }}.zip
635+
artifacts-cli/mig-cli-${{ env.SEMVER }}-linux-x64.zip
636+
artifacts-cli/mig-cli-${{ env.SEMVER }}-win-x64.zip
637+
artifacts-docs/mig-docs-${{ env.SEMVER }}.zip
636638
637639
- name: Publish release with GitReleaseManager
638-
uses: gittools/actions/gitreleasemanager/publish@v0.10.2
640+
uses: gittools/actions/gitreleasemanager/publish@v3.1.11
639641
if: ${{ contains(github.ref, 'refs/heads/main') }}
640642
with:
641643
token: ${{ secrets.GITHUB_TOKEN }}
642644
owner: ${{ steps.repo.outputs._0 }}
643645
repository: ${{ steps.repo.outputs._1 }}
644-
tagName: ${{ env.MAJORMINORPATCH }}
646+
milestone: ${{ env.MAJORMINORPATCH }}
645647

646648
- name: Close release with GitReleaseManager
647-
uses: gittools/actions/gitreleasemanager/close@v0.10.2
649+
uses: gittools/actions/gitreleasemanager/close@v3.1.11
648650
if: ${{ contains(github.ref, 'refs/heads/main') }}
649651
with:
650652
token: ${{ secrets.GITHUB_TOKEN }}
651653
owner: ${{ steps.repo.outputs._0 }}
652654
repository: ${{ steps.repo.outputs._1 }}
653655
milestone: ${{ env.MAJORMINORPATCH }}
656+
657+
- name: Unzip docs
658+
if: ${{ contains(github.ref, 'refs/heads/main') }}
659+
run: |
660+
mkdir userguide
661+
unzip artifacts-docs/mig-docs-${{ env.SEMVER }}.zip -d userguide/
662+
ls -lR userguide/
663+
664+
- name: Deploy Docs
665+
uses: peaceiris/actions-gh-pages@v3
666+
if: ${{ contains(github.ref, 'refs/heads/main') }}
667+
with:
668+
github_token: ${{ secrets.GITHUB_TOKEN }}
669+
publish_dir: userguide/
670+
publish_branch: docs

0 commit comments

Comments
 (0)