Created
December 22, 2021 03:57
-
-
Save kekyo/d018fa0c62d90d2e854986d5cd6baa12 to your computer and use it in GitHub Desktop.
Uses MSBuild on GitHub Actions
This file contains hidden or 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 Framework | |
on: | |
push: | |
# branches: | |
# - main | |
# - develop | |
# pull_request: | |
# branches: | |
# - main | |
# - develop | |
# workflow_dispatch: | |
# branches: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-latest | |
# runs-on: [self-hosted, windows, x64] | |
strategy: | |
fail-fast: false | |
matrix: | |
buildConfiguration: [Debug, Release] | |
env: | |
buildConfiguration: ${{ matrix.buildConfiguration }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Install NuGet Cli | |
uses: nuget/setup-nuget@v1 | |
- name: Install dependencies | |
run: nuget restore hoge\hoge.csproj -SolutionDirectory . | |
- name: Build | |
run: msbuild -p:Configuration=${{env.buildConfiguration}} -p:Platform="AnyCPU" -maxCpuCount hoge\hoge.csproj | |
- name: Test | |
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} hoge\hoge.csproj -- Platform="AnyCPU" | |
timeout-minutes: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment