Skip to content

Commit

Permalink
chore: create msbuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dulingzhi authored and Ling Zhi Du committed Jun 28, 2021
1 parent 67230de commit 255dace
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: MSBuild

on: [push]

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .\.Build\ObjEditing.sln

# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2

- name: Run Premake
working-directory: ${{env.GITHUB_WORKSPACE}}
run: .\bin\premake5.exe vs2019

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}

- name: Deploy
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: .\.Build\bin\Release\ObjEditing.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 255dace

Please sign in to comment.