diff --git a/.github/workflows/merge-main.yml b/.github/workflows/merge-main.yml index b6bc3cf78..a05a592d1 100644 --- a/.github/workflows/merge-main.yml +++ b/.github/workflows/merge-main.yml @@ -59,65 +59,6 @@ jobs: with: sarif_file: "trivy-results.sarif" - GitVersion: - name: Git Version - runs-on: ubuntu-22.04 - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} # checkout the correct branch name - fetch-depth: 0 # fetch the whole repo history - - - name: Setup GitVersion - uses: gittools/actions/gitversion/setup@v0.9.7 - with: - versionSpec: '5.x' - - - name: Determine SemVersion - id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.7 - with: - useConfigFile: true - configFilePath: GitVersion.yaml - - - name: Display GitVersion outputs - run: | - echo "Major: ${{ steps.gitversion.outputs.major }}" - echo "Minor: ${{ steps.gitversion.outputs.minor }}" - echo "Patch: ${{ steps.gitversion.outputs.patch }}" - echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}" - echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}" - echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}" - echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}" - echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}" - echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}" - echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}" - echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}" - echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" - echo "SemVer: ${{ steps.gitversion.outputs.semVer }}" - echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}" - echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}" - echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}" - echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}" - echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}" - echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}" - echo "BranchName: ${{ steps.gitversion.outputs.branchName }}" - echo "EscapedBranchName: ${{ steps.gitversion.outputs.escapedBranchName }}" - echo "Sha: ${{ steps.gitversion.outputs.sha }}" - echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}" - echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" - echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}" - echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}" - echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}" - echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}" - echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}" - echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}" - echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}" - echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}" - outputs: - fullSemVer: ${{ steps.gitversion.outputs.fullSemVer}} - deploys-test: name: TEST Deployments needs: @@ -212,13 +153,73 @@ jobs: repository: ${{ github.repository }}/${{ matrix.component }} target: test tags: prod + + GitVersion: + name: Mainline Versioning - GitVersion + needs: + - deploys-prod + runs-on: ubuntu-22.04 + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} # checkout the correct branch name + fetch-depth: 0 # fetch the whole repo history + + - name: Setup GitVersion + uses: gittools/actions/gitversion/setup@v0.9.7 + with: + versionSpec: '5.x' + + - name: Determine SemVersion + id: gitversion + uses: gittools/actions/gitversion/execute@v0.9.7 + with: + useConfigFile: true + configFilePath: GitVersion.yaml + + - name: Display GitVersion outputs + run: | + echo "Major: ${{ steps.gitversion.outputs.major }}" + echo "Minor: ${{ steps.gitversion.outputs.minor }}" + echo "Patch: ${{ steps.gitversion.outputs.patch }}" + echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}" + echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}" + echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}" + echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}" + echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}" + echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}" + echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}" + echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}" + echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" + echo "SemVer: ${{ steps.gitversion.outputs.semVer }}" + echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}" + echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}" + echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}" + echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}" + echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}" + echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}" + echo "BranchName: ${{ steps.gitversion.outputs.branchName }}" + echo "EscapedBranchName: ${{ steps.gitversion.outputs.escapedBranchName }}" + echo "Sha: ${{ steps.gitversion.outputs.sha }}" + echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}" + echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" + echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}" + echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}" + echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}" + echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}" + echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}" + echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}" + echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}" + echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}" + outputs: + fullSemVer: ${{ steps.gitversion.outputs.fullSemVer}} release: name: Create Release runs-on: ubuntu-22.04 needs: - GitVersion - - deploys-prod steps: - uses: actions/create-release@v1 env: