-
-
Notifications
You must be signed in to change notification settings - Fork 191
68 lines (59 loc) · 1.82 KB
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
api: [vulkan, d3d12]
runs-on: "windows-2022"
env:
msbuild_path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
steps:
- uses: actions/checkout@v3
- name: Generate project files
shell: python
env:
API: ${{ matrix.api }}
run: |
import subprocess
import os
api = os.environ["API"]
subprocess.run(f"python generate_vs2022_{api}.py")
- name: Build
shell: cmd
run: '"%msbuild_path%\MSBuild.exe" /p:Platform=Windows /p:Configuration=Release /m spartan.sln'
- name: Create artifact
if: github.event_name != 'pull_request' && matrix.api != 'd3d12'
shell: cmd
run: 'build_scripts\package_artifact.bat ${{ matrix.api }}'
- name: Upload artifact
if: github.event_name != 'pull_request' && matrix.api != 'd3d12'
uses: actions/upload-artifact@v2
with:
name: build_${{ matrix.api }}
path: build_${{ matrix.api }}.7z
release:
if: github.event_name != 'pull_request'
runs-on: "ubuntu-latest"
needs:
- build
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Vulkan build
uses: actions/download-artifact@v2
with:
name: build_vulkan
path: build_vulkan.7z
- name: Publish release
uses: "marvinpinto/[email protected]"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
build_vulkan.7z
LICENSE.txt