Github push commit C# 自動 建置 auto build

  • 228
  • 0

Github push commit C# 自動 建置 auto build

Add dotnet.yml workflow file at .github/workflows/dotnet.yml  in the repository,

file content example:

name: NET

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: windows-2019
    steps:
      - name: checkout
        uses: actions/checkout@v1
      - name: Build DotNET35
        run: |
           cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
           .\MSBuild.exe $Env:GITHUB_WORKSPACE\ConsoleApplication1\ConsoleApplication1.sln

more detail can see the question I ask in Github Community Forum.