build-dotnet #1649
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) Microsoft Corporation. | |
# Licensed under the MIT License. | |
# This workflow will build the TypeAgent TypeScript code | |
name: build-dotnet | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
merge_group: | |
branches: ["main"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
pull-requests: read | |
contents: read | |
jobs: | |
build_dotnet: | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: ["Debug", "Release"] | |
runs-on: "windows-latest" | |
steps: | |
- name: Setup Git LF | |
run: | | |
git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
dotnet: | |
- "dotnet/**" | |
- ".github/workflows/build-dotnet.yml" | |
- name: Setup MSBuild | |
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.dotnet == 'true' }} | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup NuGet | |
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.dotnet == 'true' }} | |
uses: NuGet/[email protected] | |
- name: Restore Packages | |
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.dotnet == 'true' }} | |
working-directory: dotnet | |
run: nuget restore autoShell/AutoShell.sln | |
- name: Build Solution | |
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.dotnet == 'true' }} | |
working-directory: dotnet | |
run: | | |
msbuild.exe autoShell/AutoShell.sln /p:platform="Any CPU" /p:configuration="${{ matrix.configuration }}" |