首页 > 解决方案 > 谁能帮我合并我的工作流文件?:)

问题描述

我目前正在使用三个 yml 文件来触发我的 GitHub 存储库中的自动化。存储库中的解决方案是 .net 解决方案。

一个是检查调试以确保解决方案构建前:

name: Solution-Debug-Check

on:
  pull_request:
    branches: [ master,staging,development ]
    
env:
  SOLUTION_NAME: ./src/main/Solution.sln
  BUILD_CONFIGURATION: Debug

jobs:
  build:
    runs-on: Windows
    steps:
    - uses: actions/checkout@v2
    - name: Restore
      run: nuget restore ${env:SOLUTION_NAME}
    - name: Build
      run: msbuild ${env:SOLUTION_NAME} -p:Configuration=${env:BUILD_CONFIGURATION}

第二个在 Release ex 中构建解决方案后创建 Web 工件:

name: Solution-CI-Release

on:
  push:
    branches: [master, staging]

env:
  SOLUTION_NAME: ./src/main/Solution.sln
  BUILD_CONFIGURATION: Release
  OUTPUT_FOLDER: ../../../output
  WEB_CONFIG: Web.config

jobs:
  publish:
    runs-on: Windows
    steps:
    - uses: actions/checkout@v2
    - name: Restore NuGet packages
      run: nuget restore ${env:SOLUTION_NAME}

    - name: Build Solution
      run: msbuild ${env:SOLUTION_NAME} -p:Configuration=${env:BUILD_CONFIGURATION}

    - name: Save Web Artifacts
      uses: actions/upload-artifact@v2
      with:
        name: core-components 
        path: ./core-components.exe
        retention-days: 7

    - name: Save Installers
      uses: actions/upload-artifact@v2
      with:
        name: installers
        path: ./src/main/build/*.msi
        retention-days: 7


第三个在 Debug ex 中构建解决方案后创建 Web 工件:

name: Solution-CI-Debug

on:
  push:
    branches: [development]

env:
  SOLUTION_NAME: ./src/main/Solution.sln
  BUILD_CONFIGURATION: Debug
  OUTPUT_FOLDER: ../../../output
  WEB_CONFIG: Web.config

jobs:
  publish:
    runs-on: Windows
    steps:
    - uses: actions/checkout@v2
    - name: Restore NuGet packages
      run: nuget restore ${env:SOLUTION_NAME}

    - name: Build Solution
      run: msbuild ${env:SOLUTION_NAME} -p:Configuration=${env:BUILD_CONFIGURATION}

    - name: Save Web Artifacts
      uses: actions/upload-artifact@v2
      with:
        name: core-components 
        path: ./core-components.exe
        retention-days: 7

    - name: Save Installers
      uses: actions/upload-artifact@v2
      with:
        name: installers
        path: ./src/main/build/*.msi
        retention-days: 7

如何合并这些文件?

标签: asp.net-mvcworkflowgithub-actions

解决方案


推荐阅读