-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9c9116
commit 5757feb
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: eShop Workshop CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- "**/*.md" | ||
- "**/*.gitignore" | ||
- "**/*.gitattributes" | ||
|
||
pull_request: | ||
paths-ignore: | ||
- "**/*.md" | ||
- "**/*.gitignore" | ||
- "**/*.gitattributes" | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
name: Build Repo | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install .NET SDK | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
global-json-file: ${{ matrix.os == 'ubuntu-latest' && './global.json' || '.\global.json' }} | ||
|
||
- name: Build | ||
run: ${{ matrix.os == 'ubuntu-latest' && './build.sh' || '.\build.cmd' }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@ECHO OFF | ||
|
||
dotnet workload update --skip-sign-check --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json | ||
dotnet workload install aspire --skip-sign-check --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json | ||
|
||
dotnet build .\build\Build.proj |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
dotnet workload update --skip-sign-check --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json | ||
dotnet workload install aspire --skip-sign-check --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json | ||
|
||
dotnet build ./build/Build.proj |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<Project Sdk="Microsoft.Build.NoTargets/3.7.0"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<RepoSlns Include="$(MSBuildThisFileDirectory)../*.sln" /> | ||
<AppHostProjects Include="$(MSBuildThisFileDirectory)../src/**/*.AppHost/*.AppHost.csproj" /> | ||
</ItemGroup> | ||
|
||
<Target Name="BuildRepoSlns" BeforeTargets="Build"> | ||
<Message Text="Building @(RepoSlns->Count()) solutions" Importance="High" /> | ||
|
||
<MSBuild Projects="@(RepoSlns)" Targets="Restore" /> | ||
<MSBuild Projects="@(RepoSlns)" Targets="Build" BuildInParallel="True" /> | ||
|
||
<Message Text="@(RepoSlns->Count()) solutions successfully built" Importance="High" /> | ||
</Target> | ||
|
||
<!-- <Target Name="PublishRepoSlns" AfterTargets="BuildRepoSlns"> | ||
<Message Text="Publishing @(RepoSlns->Count()) solutions" Importance="High" /> | ||
<MSBuild Projects="@(RepoSlns)" Targets="Restore" /> | ||
<MSBuild Projects="@(RepoSlns)" Targets="Publish" BuildInParallel="True" /> | ||
<Message Text="@(RepoSlns->Count()) solutions successfully published" Importance="High" /> | ||
</Target> --> | ||
|
||
<Target Name="GenerateAppHostManifests" AfterTargets="PublishRepoSlns"> | ||
<Message Text="Generating manifests for @(AppHostProjects->Count()) AppHost projects" Importance="High" /> | ||
|
||
<MSBuild Projects="@(AppHostProjects)" Targets="GenerateAspireManifest" BuildInParallel="True"> | ||
<Output TaskParameter="TargetOutputs" ItemName="GeneratedManifestFiles" /> | ||
</MSBuild> | ||
|
||
<Message Text="Generated manifest for '%(GeneratedManifestFiles.MSBuildSourceProjectFile)'" Importance="High" /> | ||
<Message Text="@(AppHostProjects->Count()) manifests generated" Importance="High" /> | ||
</Target> | ||
</Project> |