diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index 0f1d5d04..02e2f381 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -596,13 +596,38 @@ jobs: echo "🔧 Running Inno Setup to create installer..." & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "innosetup.iss" - echo "👉 Checking output installer..." + echo "👉 Checking if installer exists in current directory ..." dir + $originalInstaller = Get-ChildItem -Path "SocNetV-*installer.exe" -ErrorAction SilentlyContinue + if (-not $originalInstaller) { + echo "❌ Error: Installer file not found!" + exit 1 + } echo "🔧 Renaming installer..." - Get-ChildItem -Path "SocNetV-*installer.exe" | Move-Item -Destination "SocNetV-${{env.VERSION}}-windows-installer.exe" + $installerName = "SocNetV-${{env.VERSION}}-windows-installer.exe" + Get-ChildItem -Path "SocNetV-*installer.exe" | Move-Item -Destination $installerName dir + echo "🎉 Exporting installer name to environment variable..." + echo "WINDOWS_ARTIFACT=$installerName" >> $env:GITHUB_ENV + echo "🎉 Windows build complete. Artifacts are ready!" + - if: contains( matrix.os, 'windows') && matrix.qt-version == '6.8.0' && env.WINDOWS_ARTIFACT != '' + name: 📤 Upload ${{matrix.os}} build artifacts of ${{env.APP_NAME}} ${{ env.VERSION }} to GitHub ${{ env.UPLOAD_URL }} + run: | + echo "🔍 Verifying artifact: ${{ env.WINDOWS_ARTIFACT }}" + pwd + ls build + if [ ! -f "./build/${{ env.WINDOWS_ARTIFACT }}" ]; then + echo "❌ Error: Artifact not found!" + exit 1 + fi + + echo "📤 Uploading artifact to GitHub release..." + gh release upload continuous "./build/${{ env.WINDOWS_ARTIFACT }}" --repo "${{ github.repository }}" \ + --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: echo "🍏 This job's status is ${{ job.status }}."