Skip to content

Commit 54e7078

Browse files
committed
Publish demo to GitHub pages
1 parent 2cf0243 commit 54e7078

File tree

10 files changed

+32
-14
lines changed

10 files changed

+32
-14
lines changed

.github/workflows/build-all.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
dotnet-version: 3.1.200
2222

2323
- name: Restore library
24-
run: dotnet restore BlazorLazyLoading.sln
24+
run: dotnet restore -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
2525

2626
- name: Build library
27-
run: dotnet build -c Release BlazorLazyLoading.sln
27+
run: dotnet build -c Release -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
2828

2929
- name: Test library
30-
run: dotnet test -c Release BlazorLazyLoading.sln
30+
run: dotnet test -c Release -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
3131

3232
- name: Pack library
33-
run: dotnet pack -c Release BlazorLazyLoading.sln
33+
run: dotnet pack -c Release -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
3434

3535
- name: Upload artifacts
3636
uses: actions/upload-artifact@v1
@@ -44,5 +44,8 @@ jobs:
4444
- name: Build demo
4545
run: dotnet build -c Release -p:BLLUseLocalNugetPackages=true demo/Demo.sln
4646

47+
- name: Publish demo
48+
run: dotnet publish -c Release -o output/demo -p:BLLUseLocalNugetPackages=true demo/Demo.sln
49+
4750
- name: Test demo
4851
run: dotnet test -c Release demo/Demo.sln

.github/workflows/nuget-publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,31 @@ jobs:
2828
dotnet-version: 3.1.200
2929

3030
- name: Restore library
31-
run: dotnet restore BlazorLazyLoading.sln
31+
run: dotnet restore -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
3232

3333
- name: Build library
34-
run: dotnet build -c Release BlazorLazyLoading.sln
34+
run: dotnet build -c Release -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
3535

3636
- name: Test library
37-
run: dotnet test -c Release BlazorLazyLoading.sln
37+
run: dotnet test -c Release -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
3838

3939
- name: Pack library
40-
run: dotnet pack -c Release BlazorLazyLoading.sln
40+
run: dotnet pack -c Release -p:BLLUseLocalNugetPackages=true BlazorLazyLoading.sln
4141

4242
- name: Restore demo
4343
run: dotnet restore -p:BLLUseLocalNugetPackages=true demo/Demo.sln
4444

4545
- name: Build demo
4646
run: dotnet build -c Release -p:BLLUseLocalNugetPackages=true demo/Demo.sln
4747

48+
- name: Publish demo
49+
run: dotnet publish -c Release -o output/demo -p:BLLUseLocalNugetPackages=true demo/Demo.sln
50+
4851
- name: Test demo
4952
run: dotnet test -c Release demo/Demo.sln
5053

5154
- name: Push package to NuGet
52-
run: dotnet nuget push output/**/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
55+
run: dotnet nuget push output/nuget/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
5356

5457
- name: Upload artifacts
5558
uses: actions/upload-artifact@v1

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55
<SolutionDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)</SolutionDir>
66
</PropertyGroup>
77

8+
<!-- Convert $(BLLUseLocalNugetPackages) to bool -->
9+
<PropertyGroup>
10+
<BLLUseLocalNugetPackages Condition="'$(BLLUseLocalNugetPackages)' == ''">false</BLLUseLocalNugetPackages>
11+
</PropertyGroup>
12+
813
</Project>

demo/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
<Import Project="LocalNugetVersion.props" />
44

5+
<PropertyGroup>
6+
<!-- Polyfill $(SolutionDir) -->
7+
<SolutionDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)</SolutionDir>
8+
</PropertyGroup>
9+
510
<!-- Convert $(BLLUseLocalNugetPackages) to bool -->
611
<PropertyGroup>
712
<BLLUseLocalNugetPackages Condition="'$(BLLUseLocalNugetPackages)' == ''">false</BLLUseLocalNugetPackages>

demo/NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="local-repo" value="../output/" />
4+
<add key="local-repo" value="../output/nuget/" />
55
</packageSources>
66
</configuration>

nuget.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="local-repo" value="output/" />
4+
<add key="local-repo" value="output/nuget/" />
55
</packageSources>
66
</configuration>

nuget/BlazorLazyLoading.Module/BlazorLazyLoading.Module.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<None Remove="build\bin\**" />
2727
</ItemGroup>
2828

29-
<Target Name="CopyBinToBuild" AfterTargets="Build">
29+
<Target Name="CopyBinToBuild" AfterTargets="Build" Condition="!$(BLLUseLocalNugetPackages)">
3030
<Message Importance="high" Text="[HACK] Copying bin files..." />
3131
<ItemGroup>
3232
<BinFiles Include="$(MSBuildThisFileDirectory)bin/$(Configuration)/$(TargetFramework)/**/*.*" />

nuget/NugetCommon.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</ItemGroup>
99

1010
<PropertyGroup>
11-
<PackageOutputDir>$(MSBuildThisFileDirectory)..\output</PackageOutputDir>
12-
<PackageOutputPath>$(MSBuildThisFileDirectory)..\output</PackageOutputPath>
11+
<PackageOutputDir>$(MSBuildThisFileDirectory)..\output\nuget</PackageOutputDir>
12+
<PackageOutputPath>$(MSBuildThisFileDirectory)..\output\nuget</PackageOutputPath>
1313
</PropertyGroup>
1414

1515
<PropertyGroup>
File renamed without changes.

output/nuget/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)