mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
paths: [ 'Magpie.sln', 'src/**', 'ci/**', '.github/workflows/build.yml' ]
|
|
pull_request:
|
|
paths: [ 'Magpie.sln', 'src/**', 'ci/**', '.github/workflows/build.yml' ]
|
|
|
|
# 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@v3
|
|
|
|
- name: Load Conan cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ./.conan/data
|
|
key: ${{ runner.os }}-conan-${{ hashFiles('src/conanfile.txt') }}
|
|
|
|
- name: Restore NuGet packages
|
|
run: nuget restore
|
|
|
|
- name: Setup Conan
|
|
run: pip install conan<2.0
|
|
|
|
- name: Setup MSBuild
|
|
uses: microsoft/setup-msbuild@v1
|
|
|
|
- name: Build
|
|
run: pwsh "ci/build.ps1"
|
|
|
|
- name: Save hash
|
|
id: hash
|
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $env:GITHUB_OUTPUT
|
|
|
|
- name: Store build
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Magpie_dev_${{ steps.hash.outputs.sha_short }}
|
|
path: ./publish
|