From 9e4b3953ff897fde1a7c7ac3ca2ec03937058e77 Mon Sep 17 00:00:00 2001 From: SuperSonic16 <25761885+thesupersonic16@users.noreply.github.com> Date: Wed, 22 Jan 2025 04:53:48 +1100 Subject: [PATCH] Attempt 1 --- .github/workflows/build-windows.yml | 61 +++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 00000000..8433ce4a --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,61 @@ +name: Build Project + +on: + workflow_dispatch: + push: + branches: + - windows-actions + +env: + CMAKE_PRESET: x64-Clang-Release + +jobs: + build: + name: Build Windows + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + token: ${{ secrets.ORG_TOKEN }} + + - name: Checkout private repository + uses: actions/checkout@v4 + with: + repository: ${{ secrets.ASSET_REPO }} + token: ${{ secrets.ASSET_REPO_TOKEN }} + path: .\private + + - name: Install dependencies + run: |- + choco install ninja + + - name: Configure Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1 + + - name: Prepare Project + run: | + cp -r .\private ..\RecompCiTest\UnleashedRecompLib + + - name: Configure Project + run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE + + - name: Build Project + run: cmake . --build + + - name: Pack Release + run: Compress-Archive -Path .\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\* -DestinationPath .\UnleashedRecomp-Windows.zip + + - name: Upload artifact to Discord + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + if: ${{ env.DISCORD_WEBHOOK != '' }} + uses: tsickert/discord-webhook@v6.0.0 + with: + webhook-url: ${{ env.DISCORD_WEBHOOK }} + content: | + Commit: ${{ github.sha }} + Branch: ${{ github.ref_name }} + filename: .\UnleashedRecomp-Windows.zip \ No newline at end of file