From 160294b6fdb29f5e1478abd5308be9ef1fe0cab8 Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Wed, 13 Mar 2024 12:44:21 +0000 Subject: [PATCH] Moved build version to separate action --- .github/actions/build-version/action.yml | 29 ++++++++++++++++++++++++ .github/actions/build/action.yml | 21 +---------------- 2 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 .github/actions/build-version/action.yml diff --git a/.github/actions/build-version/action.yml b/.github/actions/build-version/action.yml new file mode 100644 index 00000000..51fcba8a --- /dev/null +++ b/.github/actions/build-version/action.yml @@ -0,0 +1,29 @@ +--- # Define build version properites +name: 'Define Build Version' +description: 'Defines the build version properties' + +runs: + using: "composite" + steps: + - name: "Get Unique Build Number" + if: steps.build_tools.outputs.BUILD_ENV == 'true' + uses: onyxmueller/build-tag-number@v1.0.3 + id: build-number + with: + token: ${{inputs.GITHUB_TOKEN}} + prefix: github + + - if: steps.build_tools.outputs.BUILD_ENV == 'true' + name: "Set Define Build Version" + shell: bash + run: dotnet buildversion --BuildNumber "${{steps.build-number.outputs.build_number}}" + env: + DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" + DOTNET_INSTALL_DIR: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" + DOTNET_MULTILEVEL_LOOKUP: "false" + DOTNET_NOLOGO: "true" + DOTNET_PRINT_TELEMETRY_MESSAGE: "false" + DOTNET_ReadyToRun: "0" + DOTNET_TC_QuickJitForLoops: "1" + DOTNET_TieredPGO: "1" + MSBUILDTERMINALLOGGER: "auto" diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 3328dc74..57a50136 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -181,26 +181,7 @@ runs: - name: "Get Unique Build Number" if: steps.build_tools.outputs.BUILD_ENV == 'true' - uses: onyxmueller/build-tag-number@v1.0.3 - id: build-number - with: - token: ${{inputs.GITHUB_TOKEN}} - prefix: github - - - if: steps.build_tools.outputs.BUILD_ENV == 'true' - name: "Set Define Build Version" - shell: bash - run: dotnet buildversion --BuildNumber "${{steps.build-number.outputs.build_number}}" - env: - DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" - DOTNET_INSTALL_DIR: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" - DOTNET_MULTILEVEL_LOOKUP: "false" - DOTNET_NOLOGO: "true" - DOTNET_PRINT_TELEMETRY_MESSAGE: "false" - DOTNET_ReadyToRun: "0" - DOTNET_TC_QuickJitForLoops: "1" - DOTNET_TieredPGO: "1" - MSBUILDTERMINALLOGGER: "auto" + uses: ./.github/actions/build-version - name: "Deploy check - Default" shell: bash