release-windows: Use current ProductVersion (#2867)

The filename of the daily built installer still contains 2.0 e.g.:
cppcheck-2.0.182-x64-Setup.msi
- Read the ProductVersion from productInfo.wxi and use it in the
file name of the cppcheck setup file.
- Add possibility to manually trigger this GitHub action using
  workflow_dispatch:
- Fix indentation, yamllint error:
  10:5 error wrong indentation: expected 6 but found 4 (indentation)
This commit is contained in:
Wolfgang Stöggl 2020-10-31 12:23:24 +01:00 committed by GitHub
parent bc5ec38149
commit 661ff1e067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -10,6 +10,7 @@ on:
- '2.*' - '2.*'
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
workflow_dispatch:
defaults: defaults:
run: run:
@ -88,7 +89,12 @@ jobs:
mkdir bin mkdir bin
xcopy /S Build\gui bin xcopy /S Build\gui bin
cd win_installer cd win_installer
msbuild -m cppcheck.wixproj /p:Platform=x64,ProductVersion=2.0.${{ github.run_number }} REM Read ProductVersion
for /f "tokens=4 delims= " %%a in ('find "ProductVersion" productInfo.wxi') do set PRODUCTVER=%%a
REM Remove double quotes
set PRODUCTVER=%PRODUCTVER:"=%
echo ProductVersion=%PRODUCTVER%
msbuild -m cppcheck.wixproj /p:Platform=x64,ProductVersion=%PRODUCTVER%.${{ github.run_number }}
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with: