Skip to content

Commit

Permalink
Moved build version to separate action
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Mar 13, 2024
1 parent 81853fa commit 160294b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
29 changes: 29 additions & 0 deletions .github/actions/build-version/action.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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"
21 changes: 1 addition & 20 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,26 +181,7 @@ runs:
- name: "Get Unique Build Number"
if: steps.build_tools.outputs.BUILD_ENV == 'true'
uses: onyxmueller/[email protected]
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
Expand Down

0 comments on commit 160294b

Please sign in to comment.