Merge pull request #29 from jiajiaxd/master
修复无法使用msbuild编译的问题,添加Github Actions自动编译
This commit is contained in:
commit
921505a5a4
53
.github/workflows/main.yml
vendored
Normal file
53
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: .NET Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# 安装 .NET Core
|
||||||
|
- name: Install .NET Core
|
||||||
|
uses: actions/setup-dotnet@v2
|
||||||
|
with:
|
||||||
|
dotnet-version: '6.0.x'
|
||||||
|
|
||||||
|
# 安装 NuGet
|
||||||
|
- name: Setup NuGet
|
||||||
|
uses: nuget/setup-nuget@v1
|
||||||
|
with:
|
||||||
|
nuget-version: '5.x'
|
||||||
|
|
||||||
|
# 还原 NuGet 包
|
||||||
|
- name: NuGet restore
|
||||||
|
run: nuget restore
|
||||||
|
|
||||||
|
# 添加 MSBuild.exe 到环境变量: https://github.com/microsoft/setup-msbuild
|
||||||
|
- name: Add msbuild to PATH
|
||||||
|
uses: microsoft/setup-msbuild@v1.0.2
|
||||||
|
|
||||||
|
# 编译整个项目
|
||||||
|
- name: Build the solution
|
||||||
|
run: |
|
||||||
|
msbuild -t:restore
|
||||||
|
msbuild /p:Configuration=Release /p:Platform="Any CPU"
|
||||||
|
env:
|
||||||
|
Configuration: ${{ matrix.configuration }}
|
||||||
|
|
||||||
|
# 上传编译成品
|
||||||
|
- name: Upload to artifact
|
||||||
|
uses: actions/upload-artifact@main
|
||||||
|
with:
|
||||||
|
name: Ink-Canvas
|
||||||
|
path: Ink Canvas/bin/Release
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@ -241,6 +241,12 @@
|
|||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Office.Interop.PowerPoint">
|
||||||
|
<Version>15.0.4420.1018</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="MicrosoftOfficeCore">
|
||||||
|
<Version>15.0.0</Version>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="ModernWpfUI">
|
<PackageReference Include="ModernWpfUI">
|
||||||
<Version>0.9.4</Version>
|
<Version>0.9.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
@ -339,4 +345,4 @@
|
|||||||
<None Include="Resources\TimerDownNotice.wav" />
|
<None Include="Resources\TimerDownNotice.wav" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user