@@ -31,19 +31,32 @@ runs:
3131 arch : ${{inputs.platform-name}}
3232
3333 - name : Cache VPC output
34- uses : actions/cache@v4
3534 id : cache-vpc
35+ uses : actions/cache@v4
3636 with :
3737 path : .\external\vpc\out
3838 key : Vpc-${{runner.os}}-${{inputs.platform-name}}-${{ hashFiles('.git\modules\external\vpc\refs\heads\main') }}
3939
4040 - name : ' Cache dependencies output for ${{inputs.solution-name}}_${{inputs.platform-name}}.sln'
41- uses : actions/cache@v4
4241 id : cache-dependencies
42+ uses : actions/cache@v4
4343 with :
4444 path : .\thirdparty\**\out
4545 key : Thirdparty-${{runner.os}}-${{inputs.platform-name}}-${{ hashFiles('.git\modules\thirdparty\**\refs\heads\main') }}
4646
47+ - name : Get build version
48+ id : get-build-version
49+ working-directory : ${{env.GITHUB_WORKSPACE}}
50+ if : runner.os == 'Windows'
51+ run : |
52+ for /f %%i in ('git rev-list --branches HEAD ^| findstr /R /N "^" ^| find /C ":"') do set PATCH_VERSION=%%i
53+
54+ set PATCH_VERSION=1.0.0.%PATCH_VERSION%
55+ echo BUILD_ARTIFACTS_PATH=%PATCH_VERSION% >> %GITHUB_OUTPUT%
56+
57+ echo Building ${{inputs.solution-name}} v.%PATCH_VERSION%
58+ shell : cmd
59+
4760 - name : ' Build dependencies for ${{inputs.solution-name}}_${{inputs.platform-name}}.sln'
4861 working-directory : ${{env.GITHUB_WORKSPACE}}
4962 if : steps.cache-dependencies.outputs.cache-hit != 'true'
6679 shell : cmd
6780
6881 - name : Get build artifacts path
69- working-directory : ${{env.GITHUB_WORKSPACE}}
7082 id : get-build-artifacts-path
83+ working-directory : ${{env.GITHUB_WORKSPACE}}
7184 run : |
7285 pushd "..\game"
7386 set ABS_PATH=%CD%
7992 - name : ' Upload ${{inputs.solution-name}}_${{inputs.platform-name}}_${{inputs.configuration-name}} build artifacts'
8093 uses : actions/upload-artifact@v4
8194 with :
82- name : ' ${{inputs.solution-name}}_ ${{inputs.platform-name}}_ ${{inputs.configuration-name}}'
95+ name : ' ${{inputs.solution-name}}- ${{runner.os}}-${{ inputs.platform-name}}- ${{inputs.configuration-name}}-${{steps.get-build-version.outputs.BUILD_VERSION }}'
8396 path : ' ${{steps.get-build-artifacts-path.outputs.BUILD_ARTIFACTS_PATH}}'
8497 if-no-files-found : error
8598 retention-days : 1
0 commit comments