Skip to content

Instantly share code, notes, and snippets.

@kekyo
Created December 22, 2021 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kekyo/d018fa0c62d90d2e854986d5cd6baa12 to your computer and use it in GitHub Desktop.
Save kekyo/d018fa0c62d90d2e854986d5cd6baa12 to your computer and use it in GitHub Desktop.
Uses MSBuild on GitHub Actions
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/setup-msbuild@v1.0.3
- 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