name: MSBuild on: workflow_call: inputs: branch: description: 'The name of the branch to checkout and build' required: true type: string env: SOLUTION_FILE_PATH: . BUILD_CONFIGURATION: Release permissions: contents: read jobs: build: runs-on: windows-latest steps: - uses: actions/checkout@v3 with: ref: ${{ inputs.branch }} - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1.0.2 - name: Restore NuGet packages working-directory: ${{env.GITHUB_WORKSPACE}} run: nuget restore ${{env.SOLUTION_FILE_PATH}} - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} - name: Upload Release Artifact uses: actions/upload-artifact@v3 with: name: Release path: ${{env.SOLUTION_FILE_PATH}}/x64/Release if-no-files-found: warn retention-days: 60