From bdef72b1fcadb963ff312e704946b00e6b75882f Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Wed, 29 Nov 2023 20:09:41 +0100 Subject: [PATCH] feat(github actions): apply latest project template changes in pieplines #6174 (#6175) --- .github/workflows/adminpanel.cd.yml | 22 +++++++++--------- .github/workflows/todotemplate.cd.yml | 23 +++++++++++-------- .../Services/MauiExceptionHandler.cs | 2 +- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/adminpanel.cd.yml b/.github/workflows/adminpanel.cd.yml index 3160cdffa5..a01a3c388e 100644 --- a/.github/workflows/adminpanel.cd.yml +++ b/.github/workflows/adminpanel.cd.yml @@ -55,7 +55,7 @@ jobs: run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Publish - run: dotnet publish AdminPanel/src/AdminPanel.Server/AdminPanel.Server.Api.csproj -p:Configuration=Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web + run: dotnet publish AdminPanel/src/AdminPanel.Server/AdminPanel.Server.csproj -p:Configuration=Release -p:PwaEnabled=true --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web - name: Upload api-web artifact uses: actions/upload-artifact@v3 @@ -143,13 +143,13 @@ jobs: run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build exe - run: dotnet build AdminPanel/src/Client/AdminPanel.Client.App/AdminPanel.Client.App.csproj -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 + run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 - name: Upload artifact uses: actions/upload-artifact@v2 with: name: win-exe-bundle - path: AdminPanel/src/Client/AdminPanel.Client.App/bin/release/net8.0-windows10.0.19041.0/win10-x86 + path: AdminPanel/src/Client/AdminPanel.Client.Maui/bin/release/net8.0-windows10.0.19041.0/win10-x86 build_blazor_hybrid_android: name: build blazor hybrid (android) @@ -179,7 +179,7 @@ jobs: - name: Extract Android signing key from env uses: timheuer/base64-to-file@v1 with: - fileDir: './AdminPanel/src/Client/AdminPanel.Client.App/' + fileDir: './AdminPanel/src/Client/AdminPanel.Client.Maui/' fileName: 'AdminPanel.keystore' encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }} @@ -197,13 +197,13 @@ jobs: run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build aab - run: dotnet build AdminPanel/src/Client/AdminPanel.Client.App/AdminPanel.Client.App.csproj -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-android + run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-android - name: Upload artifact uses: actions/upload-artifact@v2 with: name: android-bundle - path: AdminPanel/src/Client/AdminPanel.Client.App/bin/Release/net8.0-android/*-Signed.* + path: AdminPanel/src/Client/AdminPanel.Client.Maui/bin/Release/net8.0-android/*-Signed.* build_blazor_hybrid_maccatalyst: name: build blazor hybrid (maccatalyst) @@ -244,13 +244,13 @@ jobs: run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build pkg - run: dotnet build AdminPanel/src/Client/AdminPanel.Client.App/AdminPanel.Client.App.csproj -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-maccatalyst + run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-maccatalyst - name: Upload artifact uses: actions/upload-artifact@v2 with: name: mac-pkg-bundle - path: AdminPanel/src/Client/AdminPanel.Client.App/bin/release/net8.0-maccatalyst/*.pkg + path: AdminPanel/src/Client/AdminPanel.Client.Maui/bin/release/net8.0-maccatalyst/*.pkg build_blazor_hybrid_ios: name: build blazor hybrid (ios) @@ -264,7 +264,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/AdminPanel/Bit.AdminPanel/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: maxim-lobanov/setup-xcode@v1 with: @@ -316,10 +316,10 @@ jobs: run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build ipa - run: dotnet publish AdminPanel/src/Client/AdminPanel.Client.App/AdminPanel.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="AdminPanel" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-ios + run: dotnet publish AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -p:RuntimeIdentifier=ios-arm64 -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="AdminPanel" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-ios - name: Upload artifact uses: actions/upload-artifact@v2 with: name: ios-bundle - path: AdminPanel/src/Client/AdminPanel.Client.App/bin/release/net8.0-ios/ios-arm64/publish/*.ipa \ No newline at end of file + path: AdminPanel/src/Client/AdminPanel.Client.Maui/bin/release/net8.0-ios/ios-arm64/publish/*.ipa \ No newline at end of file diff --git a/.github/workflows/todotemplate.cd.yml b/.github/workflows/todotemplate.cd.yml index d6bd9fbf5a..226b093c72 100644 --- a/.github/workflows/todotemplate.cd.yml +++ b/.github/workflows/todotemplate.cd.yml @@ -50,11 +50,14 @@ jobs: - name: Install wasm run: cd src && dotnet workload install wasm-tools wasm-experimental + - name: Enable pre rendering + run: sed -i 's/public const bool PrerenderEnabled = false;/public const bool PrerenderEnabled = true;/g' src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs + - name: Generate CSS/JS files run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Publish - run: dotnet publish TodoTemplate/src/TodoTemplate.Server/TodoTemplate.Server.Api.csproj -p:Configuration=Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web + run: dotnet publish TodoTemplate/src/TodoTemplate.Server/TodoTemplate.Server.csproj -p:Configuration=Release -p:PwaEnabled=true --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web - name: Upload api-web artifact uses: actions/upload-artifact@v3 @@ -142,13 +145,13 @@ jobs: run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build exe - run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.App/TodoTemplate.Client.App.csproj -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 + run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Maui/TodoTemplate.Client.Maui.csproj -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 - name: Upload artifact uses: actions/upload-artifact@v2 with: name: win-exe-bundle - path: TodoTemplate/src/Client/TodoTemplate.Client.App/bin/release/net8.0-windows10.0.19041.0/win10-x86 + path: TodoTemplate/src/Client/TodoTemplate.Client.Maui/bin/release/net8.0-windows10.0.19041.0/win10-x86 build_blazor_hybrid_android: name: build blazor hybrid (android) @@ -178,7 +181,7 @@ jobs: - name: Extract Android signing key from env uses: timheuer/base64-to-file@v1 with: - fileDir: './TodoTemplate/src/Client/TodoTemplate.Client.App/' + fileDir: './TodoTemplate/src/Client/TodoTemplate.Client.Maui/' fileName: 'TodoTemplate.keystore' encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }} @@ -196,13 +199,13 @@ jobs: run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build aab - run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.App/TodoTemplate.Client.App.csproj -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-android + run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Maui/TodoTemplate.Client.Maui.csproj -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-android - name: Upload artifact uses: actions/upload-artifact@v2 with: name: android-bundle - path: TodoTemplate/src/Client/TodoTemplate.Client.App/bin/Release/net8.0-android/*-Signed.* + path: TodoTemplate/src/Client/TodoTemplate.Client.Maui/bin/Release/net8.0-android/*-Signed.* build_blazor_hybrid_maccatalyst: name: build blazor hybrid (maccatalyst) @@ -243,13 +246,13 @@ jobs: run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build pkg - run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.App/TodoTemplate.Client.App.csproj -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-maccatalyst + run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Maui/TodoTemplate.Client.Maui.csproj -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-maccatalyst - name: Upload artifact uses: actions/upload-artifact@v2 with: name: mac-pkg-bundle - path: TodoTemplate/src/Client/TodoTemplate.Client.App/bin/release/net8.0-maccatalyst/*.pkg + path: TodoTemplate/src/Client/TodoTemplate.Client.Maui/bin/release/net8.0-maccatalyst/*.pkg build_blazor_hybrid_ios: name: build blazor hybrid (ios) @@ -315,10 +318,10 @@ jobs: run: dotnet build TodoTemplate/src/Client/TodoTemplate.Client.Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build ipa - run: dotnet publish TodoTemplate/src/Client/TodoTemplate.Client.App/TodoTemplate.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="TodoTemplate" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-ios + run: dotnet publish TodoTemplate/src/Client/TodoTemplate.Client.Maui/TodoTemplate.Client.Maui.csproj -p:RuntimeIdentifier=ios-arm64 -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="TodoTemplate" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-ios - name: Upload artifact uses: actions/upload-artifact@v2 with: name: ios-bundle - path: TodoTemplate/src/Client/TodoTemplate.Client.App/bin/release/net8.0-ios/ios-arm64/publish/*.ipa \ No newline at end of file + path: TodoTemplate/src/Client/TodoTemplate.Client.Maui/bin/release/net8.0-ios/ios-arm64/publish/*.ipa \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Services/MauiExceptionHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Services/MauiExceptionHandler.cs index b5fd20bf62..0da2e2df29 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Services/MauiExceptionHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Services/MauiExceptionHandler.cs @@ -1,7 +1,7 @@ namespace Boilerplate.Client.Maui.Services; /// -/// You can easily install AppCenter, Firebase Crashlytics, and other exception tracking libraries in your Client.App project. +/// You can easily install AppCenter, Firebase Crashlytics, and other exception tracking libraries in your Client.Maui project. /// Then, you can use their APIs to monitor all exceptions across Android, iOS, Windows, and macOS. /// public partial class MauiExceptionHandler : ExceptionHandlerBase