Skip to content

Commit

Permalink
housekeeping: Clean NuGet Locals before CI Build (#190)
Browse files Browse the repository at this point in the history
* housekeeping: Clean NuGet Locals before CI Build

* Run samples CI when GitHub Actions config changes

* Fix step order

* Add missing properties

* Try without maxcpucount
  • Loading branch information
worldbeater authored Dec 22, 2020
1 parent 2f52438 commit 27acce3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches: [ main ]
paths:
- 'samples/**'
- '.github/**'
pull_request:
branches: [ main ]
paths:
- 'samples/**'
- '.github/**'

jobs:
build-samples:
Expand Down Expand Up @@ -40,8 +42,15 @@ jobs:
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

# The workaround from https://github.com/actions/setup-dotnet/issues/155#issuecomment-748452076
- name: Clean
run: msbuild LoginApp.sln /t:clean /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=$env:Configuration && dotnet nuget locals all --clear
working-directory: samples
env:
Configuration: ${{ matrix.configuration }}

- name: Restore/Build the sample
run: msbuild LoginApp.sln /t:restore,build /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=$env:Configuration
working-directory: samples
env:
Configuration: ${{ matrix.configuration }}
Configuration: ${{ matrix.configuration }}

0 comments on commit 27acce3

Please sign in to comment.