-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (49 loc) · 1.76 KB
/
build.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
name: build
on:
push:
branches: [ "main" ]
jobs:
build-win:
env:
SOLUTION_FILE_PATH: .
PLATFORM: x86
strategy:
matrix:
BUILD_CONFIGURATION: [ Debug, Release, ReleaseDedicated ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Initialize Submodules
uses: snickerbockers/submodules-init@v4
- name: Determine Version
id: determine_version
run: |
$version = (git rev-parse --short=7 HEAD).Trim()
Write-Output "Version determined: $version"
Write-Host "::set-output name=version::$version"
- name: Install 7Zip
run: |
Invoke-WebRequest -Uri "https://www.7-zip.org/a/7z1900-x64.msi" -OutFile "$env:TEMP\7z.msi"
Start-Process -Wait -FilePath msiexec -ArgumentList "/i", "$env:TEMP\7z.msi", "/quiet"
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: msbuild /m /verbosity:minimal /p:Configuration=${{ matrix.BUILD_CONFIGURATION }} /p:Platform=${{ env.PLATFORM }} ${{ matrix.SOLUTION_FILE_PATH }}
- name: Zip Release
run: |
& "C:\Program Files\7-Zip\7z.exe" a ${{ matrix.BUILD_CONFIGURATION }}.7z ./bin/${{ matrix.BUILD_CONFIGURATION }}/*
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.BUILD_CONFIGURATION }}.7z
tag_name: ${{ steps.determine_version.outputs.version }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#- name: Upload
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.BUILD_CONFIGURATION }}
# path: ./bin/${{ matrix.BUILD_CONFIGURATION }}/