Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 34 additions & 21 deletions .github/workflows/ci.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"

Expand All @@ -52,7 +52,7 @@ jobs:
tools: licensefinder

- name: Enable NuGet cache
uses: actions/cache@v4.0.2
uses: actions/cache@v4.2.3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
Expand Down Expand Up @@ -100,12 +100,12 @@ jobs:
distribution: 'zulu'
java-version: '17'

- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"

- name: Enable NuGet cache
uses: actions/cache@v4.0.2
uses: actions/cache@v4.2.3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
working-directory: ./src

- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: "src/"
Expand Down Expand Up @@ -193,12 +193,12 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"

- name: Enable NuGet cache
uses: actions/cache@v4.0.2
uses: actions/cache@v4.2.3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
Expand All @@ -209,12 +209,14 @@ jobs:
run: dotnet restore
working-directory: ./src

- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool
- name: Setup GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '6.0.5'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v1.1.1
uses: gittools/actions/gitversion/execute@v3.1.11

with:
useConfigFile: true
Expand All @@ -224,13 +226,24 @@ jobs:
- name: Build Solution
run: dotnet build -c ${{ env.BUILD_CONFIG }} --nologo ${{ env.SOLUTION }}
working-directory: ./src

- name: Package (Official Release)
env:
PACKAGEDIR: '${{ github.workspace }}/release/'
if: ${{ github.event.inputs.nuget && matrix.os == 'ubuntu-latest' }}
run: |
mkdir $PACKAGEDIR
dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.majorMinorPatch }}
ls -lR $PACKAGEDIR
working-directory: ./src

- name: Package
env:
PACKAGEDIR: '${{ github.workspace }}/release/'
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ ! ( github.event.inputs.nuget ) && matrix.os == 'ubuntu-latest' }}
run: |
mkdir $PACKAGEDIR
dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}
dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.majorMinorPatch }}-${{ steps.gitversion.outputs.EscapedBranchName }}.${{ steps.gitversion.outputs.CommitsSinceVersionSource }}
ls -lR $PACKAGEDIR
working-directory: ./src

Expand All @@ -243,15 +256,15 @@ jobs:

- name: Upload Nuget
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/[email protected].1
uses: actions/[email protected].3
with:
name: nuget
path: ${{ github.workspace }}/release/*.nupkg
retention-days: 30

- name: Upload Zipped Plug-ins
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/[email protected].1
uses: actions/[email protected].3
with:
name: plug-ins
path: ${{ github.workspace }}/src/Plugins/release/*.zip
Expand Down Expand Up @@ -297,7 +310,7 @@ jobs:
- name: Install grp
run: dotnet tool install gpr -g

- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
Expand All @@ -313,7 +326,7 @@ jobs:
runs-on: ubuntu-latest
needs: [build, unit-test]
env:
MAJORMINORPATCH: ${{ needs.build.outputs.majorMinorPatch }}
MAJORMINORPATCH: ${{ needs.build.outputs.MajorMinorPatch }}

steps:
- uses: actions/checkout@v3
Expand All @@ -337,12 +350,12 @@ jobs:
msg: ${{ github.repository }}

- name: Install GitReleaseManager
uses: gittools/actions/gitreleasemanager/setup@v0.17.0
uses: gittools/actions/gitreleasemanager/setup@v3.1.11
with:
versionSpec: "0.13.x"
versionSpec: '0.18.x'

- name: Create release with GitReleaseManager
uses: gittools/actions/gitreleasemanager/create@v0.17.0
uses: gittools/actions/gitreleasemanager/create@v3.1.11
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ steps.repo.outputs._0 }}
Expand All @@ -354,7 +367,7 @@ jobs:

- name: Publish release with GitReleaseManager
if: ${{ contains(github.ref, 'refs/heads/main') }}
uses: gittools/actions/gitreleasemanager/publish@v0.17.0
uses: gittools/actions/gitreleasemanager/publish@v3.1.11
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ steps.repo.outputs._0 }}
Expand All @@ -363,7 +376,7 @@ jobs:

- name: Close release with GitReleaseManager
if: ${{ contains(github.ref, 'refs/heads/main') }}
uses: gittools/actions/gitreleasemanager/close@v0.17.0
uses: gittools/actions/gitreleasemanager/close@v3.1.11
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ steps.repo.outputs._0 }}
Expand Down
3 changes: 2 additions & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ header:
license:
spdx-id: Apache-2.0
copyright-owner: MONAI Consortium
copyright-year: '2021-2024'
copyright-year: '2021-2025'

paths:
- 'src'

Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
28 changes: 10 additions & 18 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,56 @@
# SPDX-FileCopyrightText: © 2022 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0

workflow: GitHubFlow/v1
assembly-versioning-scheme: MajorMinorPatchTag
assembly-file-versioning-scheme: MajorMinorPatchTag
mode: ContinuousDeployment
strategies:
- ConfiguredNextVersion
branches:
main:
tag: ''
label: ''
mode: ContinuousDelivery
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
source-branches: [ 'release' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: true
pre-release-weight: 55000
release:
tag: rc
label: rc
regex: ^releases?[/-]
mode: ContinuousDeployment
increment: None
prevent-increment-of-merged-branch-version: true
track-merge-target: false
source-branches: [ 'main', 'release' ]
tracks-release-branches: false
is-release-branch: true
is-mainline: false
pre-release-weight: 30000
feature:
tag: alpha.{BranchName}
label: alpha.{BranchName}
regex: ^features?[/-]
mode: ContinuousDeployment
increment: Inherit
prevent-increment-of-merged-branch-version: false
track-merge-target: false
source-branches: [ 'main', 'release', 'feature' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
pull-request:
tag: pr
label: pr
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDeployment
increment: Inherit
prevent-increment-of-merged-branch-version: false
tag-number-pattern: '[/-](?<number>\d+)[-/]'
track-merge-target: false
label-number-pattern: '[/-](?<number>\d+)[-/]'
source-branches: [ 'main', 'release', 'feature' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000

ignore:
sha: []
merge-message-formats: {}
next-version: 2.0.0

major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
update-build-number: false
next-version: 2.0.4
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
# SPDX-FileCopyrightText: © 2021-2024 MONAI Consortium
# SPDX-License-Identifier: Apache License 2.0

codecov:
Expand Down
Loading
Loading