diff --git a/.github/workflows/windows-support.yml b/.github/workflows/windows-support.yml deleted file mode 100644 index 083317e..0000000 --- a/.github/workflows/windows-support.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Windows Build - -on: - push: - branches: - - main - - hotfix/* - workflow_dispatch: - -jobs: - build-and-release: - runs-on: windows-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - - name: Build with Maven - run: mvn clean package - - - name: Get version and set release info - id: get_version - run: | - for /f "tokens=*" %%i in ('mvn help:evaluate -Dexpression^=project.version -q -DforceStdout') do set VERSION=%%i - for /f "tokens=*" %%i in ('git rev-parse --short HEAD') do set COMMIT_HASH=%%i - for /f "tokens=*" %%i in ('wmic os get localdatetime ^| find "."') do set DATETIME=%%i - set TIMESTAMP=%DATETIME:~0,14% - - echo VERSION=%VERSION% >> %GITHUB_OUTPUT% - echo TAG_NAME=v%VERSION%-%COMMIT_HASH%-%TIMESTAMP% >> %GITHUB_OUTPUT% - echo RELEASE_NAME=Release %VERSION% (%DATE% %TIME%) >> %GITHUB_OUTPUT% - echo IS_PRERELEASE=true >> %GITHUB_OUTPUT% - - - name: Run on Windows and perform healthcheck - run: | - start /B cmd /c ".\target\server-${{ steps.get_version.outputs.VERSION }}-oscal-server\bin\oscal-server.bat" - timeout /t 10 /nobreak - powershell -Command " - $attempt = 0 - $maxAttempts = 5 - $delay = 2 - do { - $attempt++ - try { - $response = Invoke-WebRequest -Uri http://localhost:8888/health -Method GET -UseBasicParsing - if ($response.StatusCode -eq 200) { - Write-Host 'Health check passed: 200 OK' - exit 0 - } - } catch { - Write-Host 'Health check failed. Retrying...' - } - Start-Sleep -Seconds $delay - } while ($attempt -lt $maxAttempts) - Write-Error 'Health check failed after maximum attempts' - exit 1 - " \ No newline at end of file