This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
Update README.md #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Build & Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
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@v1 | |
# with: | |
# dotnet-version: 3.1.202 | |
# 添加 MSBuild.exe 到环境变量: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v1.1 | |
with: | |
msbuild-architecture: x64 | |
# 安装 NuGet | |
- name: Setup NuGet | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-api-key: ${{ secrets.NuGetAPIKey }} | |
nuget-version: '5.x' | |
# 还原 NuGet 包 | |
#- name: NuGet restore | |
# run: nuget restore | |
# 编译整个项目 | |
- name: Build the solution | |
run: msbuild /p:Configuration=$env:Configuration /p:DeployOnBuild=true /p:PublishProfile=FolderProfile | |
env: | |
Configuration: ${{ matrix.configuration }} | |
# 上传并发布 | |
- name: Upload to Artifact | |
uses: actions/upload-artifact@v1.0.0 | |
with: | |
name: GetCID_Test | |
path: GetCID_Test\bin\Release | |