-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (54 loc) · 2.12 KB
/
build-windows-ci.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
name: Build Windows
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
repository_dispatch:
types: [init]
concurrency:
group: environment-win-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build - ${{ matrix.config.os }}
if: github.repository != 'Silverlan/pr_module_template'
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: windows-latest
name: "Windows x64 MSVC"
artifact: "Windows-MSVC.tar.xz"
build_type: "RelWithDebInfo"
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cc: "cl"
cxx: "cl"
archiver: "7z a"
generators: "Visual Studio 16 2022"
build_dir: 'build'
steps:
- name: Get Module Info
id: module-info
uses: Silverlan/pr_module_template/github_actions/get_module_info@main
- name: Build Module
id: build-module
uses: Silverlan/pragma/github_actions/build_generic_module@main
with:
module: '${{ steps.module-info.outputs.module_name }}'
- name: Create Release Files
shell: bash
run: |
if [ "${{ steps.module-info.outputs.release_directory }}" != "DEFAULT" ]; then
mkdir -p "release/${{ steps.module-info.outputs.release_directory }}"
cp -a "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.release_directory }}." "release/${{ steps.module-info.outputs.release_directory }}"
else
mkdir -p "release/${{ steps.module-info.outputs.install_directory }}"
cp "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.install_directory }}${{ steps.module-info.outputs.module_name }}.dll" "release/${{ steps.module-info.outputs.install_directory }}"
fi
- name: Release Binaries
uses: Silverlan/common_actions/release_nightly_binaries@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit: ${{ github.ref_name }}