From ebe8dcbcbfb43f0fea38769414323a87f7d08ada Mon Sep 17 00:00:00 2001 From: Codinablack Date: Wed, 25 Dec 2024 09:39:54 -0600 Subject: [PATCH] Add Edge Builds for Windows --- .github/workflows/windows_build_runner.yml | 52 +++++++++++++++++++--- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows_build_runner.yml b/.github/workflows/windows_build_runner.yml index 018f023d..c17dc355 100644 --- a/.github/workflows/windows_build_runner.yml +++ b/.github/workflows/windows_build_runner.yml @@ -1,10 +1,19 @@ name: Windows Build - -on: [workflow_dispatch, pull_request, push] +on: + workflow_dispatch: + pull_request: + push: + branches: + - 'master' + - '1.0' + - '1.1' jobs: - job: + BuildProject: name: ${{ matrix.os }}-${{ matrix.buildtype }} runs-on: ${{ matrix.os }} + permissions: + packages: write + contents: write strategy: matrix: os: [windows-2022] @@ -12,8 +21,8 @@ jobs: include: - os: windows-2022 triplet: x64-windows - packages: > - sccache + outputs: + upload_url: ${{ steps.upload_artifact.outputs.upload_url }} steps: - name: Checkout repository @@ -49,8 +58,41 @@ jobs: run: | cd D:\a\BlackTek-Server\BlackTek-Server msbuild Black-Tek-Server.sln /p:Configuration=Release + cmd /c copy Black-Tek-Server.exe BlackTek-Server-Release.exe - name: Compile Debug run: | cd D:\a\BlackTek-Server\BlackTek-Server msbuild Black-Tek-Server.sln /p:Configuration=Debug + cmd copy Black-Tek-Server.exe BlackTek-Server-Debug.exe + del Black-Tek-Server.exe + cd D:\a\BlackTek-Server + + - name: Cleanup Vcpkg_installed + uses: JesseTG/rm@v1.0.3 + with: + path: D:/a/BlackTek-Server/BlackTek-Server/vcpkg_installed + + - name: Cleanup Intermediaries + uses: JesseTG/rm@v1.0.3 + with: + path: D:/a/BlackTek-Server/BlackTek-Server/build + + - name: Prepare Compressed Assets + run: | + 7z a BlackTek-Server.zip D:/a/BlackTek-Server/BlackTek-Server/ + + - name: Upload Assets for Edge Build + if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) + uses: softprops/action-gh-release@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + prerelease: true + tag_name: Windows-Edge-Build-${{ github.sha }} + name: BlackTek-Server-WindowsEdgeBuild-${{ github.sha }} + body: | + Windows Edge build from commit ${{ github.sha }} + Commit message: ${{ github.event.head_commit.message }} + Build date: ${{ github.event.head_commit.timestamp }} + files: BlackTek-Server.zip