有什么方法可以构建YAML文件吗?

时间:2019-10-24 00:48:35

标签: yaml

我在github(de4dot)上下载了一个文件,但是构建服务器不再工作,所以我下载了build.yml文件,我想知道是否有可能构建它并获取.exe,我需要它来分析代码

这是build.yml

name: GitHub CI
on: push

    jobs:
      build:
        name: Build
        runs-on: windows-latest

        steps:
          - uses: actions/checkout@v1

          - name: Build
            shell: pwsh
            run: |
              $msbuildPath = Split-Path (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\Current\Bin\amd64\MSBuild.exe | Select-Object -First 1) -Parent
              $env:PATH = $msbuildPath + ';' + $env:PATH
              .\build.ps1
          - uses: actions/upload-artifact@v1
            with:
              name: de4dot-net35
              path: Release/net35

          - uses: actions/upload-artifact@v1
            with:
              name: de4dot-net45
              path: Release/net45

          - uses: actions/upload-artifact@v1
            with:
              name: de4dot-netcoreapp2.1
              path: publish-netcoreapp2.1

          - uses: actions/upload-artifact@v1
            with:
              name: de4dot-netcoreapp3.0
              path: publish-netcoreapp3.0

1 个答案:

答案 0 :(得分:0)

只需在PowerShell中执行构建配置告诉构建服务器在PowerShell中执行的操作即可

$msbuildPath = Split-Path (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\Current\Bin\amd64\MSBuild.exe | Select-Object -First 1) -Parent
$env:PATH = $msbuildPath + ';' + $env:PATH
.\build.ps1