diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml new file mode 100644 index 000000000..8cb75a320 --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: + - master + paths: + - 'Src/**' + - 'Localization/**' + pull_request: + branches: + - master + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build + run: Src\Setup\__MakeFinal.bat + + - uses: actions/upload-artifact@v3 + with: + name: OpenShellSetup + path: Src/Setup/Final/OpenShellSetup_*.exe + + - uses: actions/upload-artifact@v3 + with: + name: Symbols + path: Src/Setup/Final/OpenShellPDB_*.7z diff --git a/Src/Setup/__MakeFinal.bat b/Src/Setup/__MakeFinal.bat index 16bcdf1e4..2e2d32aa7 100644 --- a/Src/Setup/__MakeFinal.bat +++ b/Src/Setup/__MakeFinal.bat @@ -13,7 +13,16 @@ if defined APPVEYOR_BUILD_VERSION ( set CS_VERSION=%APPVEYOR_BUILD_VERSION% ) +if defined GITHUB_ACTIONS ( + for /f "tokens=1,2,3 delims=.v" %%i in ('git describe --tags origin/master') do ( + setlocal EnableDelayedExpansion + set /a NEXT_BUILD=%%k+1 + set CS_VERSION=%%i.%%j.!NEXT_BUILD! + ) +) + echo Version: %CS_VERSION% +exit /b 0 rem Convert . to _ set CS_VERSION_STR=%CS_VERSION:.=_%