Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 44 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
name: Build
name: Build and Release

on:
push:
branches: [ master, main ]
tags:
- 'v*'
pull_request:
branches: [ master, main ]

jobs:
build-windows:
runs-on: windows-latest

env:
VULKAN_SDK: C:\VulkanSDK\1.3.290.0

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache Vulkan SDK
id: cache-vulkan
Expand All @@ -34,9 +32,10 @@ jobs:

- name: Clone dependencies
run: |
git clone --depth 1 https://github.com/glfw/glfw.git external/glfw
git clone --depth 1 https://github.com/g-truc/glm.git external/glm
git clone --depth 1 https://github.com/ocornut/imgui.git external/imgui
if (!(Test-Path "external/glfw")) { git clone --depth 1 https://github.com/glfw/glfw.git external/glfw }
if (!(Test-Path "external/glm")) { git clone --depth 1 https://github.com/g-truc/glm.git external/glm }
if (!(Test-Path "external/imgui")) { git clone --depth 1 https://github.com/ocornut/imgui.git external/imgui }
shell: pwsh

- name: Configure CMake
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
Expand All @@ -53,3 +52,40 @@ jobs:
cmd /c compile_shaders.bat
}
shell: pwsh

- name: Package
run: |
mkdir release
copy build\Release\RacingEngine.exe release\
mkdir release\shaders\compiled
copy shaders\compiled\*.spv release\shaders\compiled\
if (Test-Path "assets") {
xcopy /E /I assets release\assets
}
Compress-Archive -Path release\* -DestinationPath RacingEngine-Windows.zip
shell: pwsh

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: windows-bin
path: RacingEngine-Windows.zip

release:
needs: [build-windows]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4

- name: List artifacts
run: ls -R

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
windows-bin/RacingEngine-Windows.zip