Create build-samples.yml #6
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
name: build samples | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-aspnetcore-samples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build netcore projects | |
run: | | |
pushd samples | |
dotnet build | |
popd | |
build-aspnet-samples: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install .NET Framework 4.6.1 Developer Pack | |
run: choco install netfx-4.6.1-devpack -y | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build AdvancedChatRoom project | |
run: | | |
pushd aspnet-samples/AdvancedChatRoom | |
nuget restore | |
msbuild AdvancedChatRoom.sln | |
popd | |
- name: Build ChatRoom project | |
run: | | |
pushd aspnet-samples/ChatRoom | |
nuget restore | |
msbuild ChatRoom.sln | |
popd | |
- name: Build ChatRoomLocal project | |
run: | | |
pushd aspnet-samples/ChatRoomLocal | |
nuget restore | |
msbuild ChatRoom.sln | |
popd | |
- name: Build AspnetForm project | |
run: | | |
pushd aspnet-samples/AspnetForm | |
nuget restore | |
msbuild AspnetForm.sln | |
popd |