42
42
runs-on : ubuntu-latest
43
43
44
44
outputs :
45
- semVer : ${{ steps.gitversion.outputs.semVer }}
46
- preReleaseLabel : ${{ steps.gitversion.outputs.PreReleaseLabel }}
47
- majorMinorPatch : ${{ steps.gitversion.outputs.MajorMinorPatch }}
48
- nuGetVersionV2 : ${{ steps.gitversion.outputs.MajorMinorPatch }}
45
+ SEMVER : ${{ steps.gitversion.outputs.semVer }}
46
+ VERSION : ${{ steps.version-tag.outputs.VERSION }}
49
47
50
48
steps :
51
49
- uses : actions/checkout@v4
70
68
updateAssemblyInfoFilename : src/AssemblyInfo.cs
71
69
configFilePath : .github/.gitversion.yml
72
70
71
+ - name : Set version tag
72
+ id : version-tag
73
+ run : |
74
+ if [ "${{ inputs.ga }}" = "true" ]; then
75
+ echo "VERSION=${{ steps.gitversion.outputs.MajorMinorPatch }}" >> $GITHUB_OUTPUT
76
+ else
77
+ echo "VERSION=${{ steps.gitversion.outputs.AssemblySemVer }}" >> $GITHUB_OUTPUT
78
+ fi
79
+
73
80
- name : Print AssemblyInfo
74
81
run : cat src/AssemblyInfo.cs
75
82
@@ -317,10 +324,8 @@ jobs:
317
324
runs-on : ${{ matrix.os }}
318
325
needs : [calc-version]
319
326
env :
320
- NUGETVER : ${{ needs.calc-version.outputs.nuGetVersionV2 }}
321
- SEMVER : ${{ needs.calc-version.outputs.semVer }}
322
- PRERELEASELABEL : ${{ needs.calc-version.outputs.PreReleaseLabel }}
323
- MAJORMINORPATCH : ${{ needs.calc-version.outputs.MajorMinorPatch }}
327
+ SEMVER : ${{ needs.calc-version.outputs.SEMVER }}
328
+ VERSION : ${{ needs.calc-version.outputs.VERSION }}
324
329
strategy :
325
330
matrix :
326
331
os : [ubuntu-latest]
@@ -402,7 +407,7 @@ jobs:
402
407
if : ${{ (matrix.os == 'ubuntu-latest') }}
403
408
run : |
404
409
mkdir ~/nupkg
405
- dotnet pack -c ${{ env.BUILD_CONFIG }} -o ~/nupkg -p:PackageVersion=${{ env.NUGETVER }}
410
+ dotnet pack -c ${{ env.BUILD_CONFIG }} -o ~/nupkg -p:PackageVersion=${{ env.VERSION }}
406
411
ls -lR ~/nupkg
407
412
working-directory : ./src/Api
408
413
@@ -429,7 +434,7 @@ jobs:
429
434
with :
430
435
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
431
436
tags : |
432
- type=raw,value=${{ inputs.ga == 'true' ? env.MAJORMINORPATCH : env.NUGETVER }}
437
+ type=raw,value=${{ env.VERSION }}
433
438
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
434
439
435
440
- name : Build and push Docker image
@@ -487,7 +492,7 @@ jobs:
487
492
runs-on : windows-latest
488
493
needs : [calc-version]
489
494
env :
490
- SEMVER : ${{ needs.calc-version.outputs.SemVer }}
495
+ SEMVER : ${{ needs.calc-version.outputs.SEMVER }}
491
496
steps :
492
497
- uses : actions/checkout@v4
493
498
with :
@@ -568,9 +573,8 @@ jobs:
568
573
runs-on : ubuntu-latest
569
574
needs : [calc-version, unit-test, docs, integration-test, analyze]
570
575
env :
571
- SEMVER : ${{ needs.calc-version.outputs.SemVer }}
572
- PRERELEASELABEL : ${{ needs.calc-version.outputs.PreReleaseLabel }}
573
- MAJORMINORPATCH : ${{ needs.calc-version.outputs.MajorMinorPatch }}
576
+ SEMVER : ${{ needs.calc-version.outputs.SEMVER }}
577
+ VERSION : ${{ needs.calc-version.outputs.VERSION }}
574
578
575
579
steps :
576
580
- uses : actions/checkout@v4
@@ -630,8 +634,8 @@ jobs:
630
634
token : ${{ secrets.GITHUB_TOKEN }}
631
635
owner : ${{ steps.repo.outputs._0 }}
632
636
repository : ${{ steps.repo.outputs._1 }}
633
- milestone : ${{ env.MAJORMINORPATCH }}
634
- name : " Release v${{ env.MAJORMINORPATCH }}"
637
+ milestone : ${{ env.VERSION }}
638
+ name : " Release v${{ env.VERSION }}"
635
639
assets : |
636
640
artifacts-cli/mig-cli-${{ env.SEMVER }}-linux-x64.zip
637
641
artifacts-docs/mig-docs-${{ env.SEMVER }}.zip
@@ -642,12 +646,12 @@ jobs:
642
646
token : ${{ secrets.GITHUB_TOKEN }}
643
647
owner : ${{ steps.repo.outputs._0 }}
644
648
repository : ${{ steps.repo.outputs._1 }}
645
- milestone : ${{ env.MAJORMINORPATCH }}
649
+ milestone : ${{ env.VERSION }}
646
650
647
651
- name : Close release with GitReleaseManager
648
652
uses :
gittools/actions/gitreleasemanager/[email protected]
649
653
with :
650
654
token : ${{ secrets.GITHUB_TOKEN }}
651
655
owner : ${{ steps.repo.outputs._0 }}
652
656
repository : ${{ steps.repo.outputs._1 }}
653
- milestone : ${{ env.MAJORMINORPATCH }}
657
+ milestone : ${{ env.VERSION }}
0 commit comments