Magpie/.github/workflows/build.yml
2021-11-18 12:03:05 +08:00

43 lines
1.1 KiB
YAML

name: build
on: [push, pull_request]
env:
# 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-2022
steps:
- uses: actions/checkout@v2.4.0
- name: Restore NuGet packages
run: nuget restore
- name: Setup Conan
run: pip install conan
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1
with:
vs-prerelease: true
- name: Conan Install
run: msbuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ./CONAN_INSTALL
- name: Publish
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ./DEPLOY
- name: Save hash
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Store build
uses: actions/upload-artifact@v2
with:
name: Magpie_dev_${{ steps.vars.outputs.sha_short }}
path: ./publish/