Skip to content

Commit

Permalink
fix(github actions): resolve issues of iOS CI/CD #6388 (#6389)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi authored Dec 25, 2023
1 parent 00a7920 commit f0b137c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/admin-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ jobs:

- name: Install wasm
run: cd src && dotnet workload install wasm-tools wasm-experimental

- name: Set android universal link
run: sed -i 's/bp.bitplatform.dev/adminpanel.bitplatform.dev/g' AdminPanel/src/Client/AdminPanel.Client.Maui/Platforms/Android/MainActivity.cs

- name: Generate CSS/JS files
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore
Expand Down Expand Up @@ -192,6 +189,9 @@ jobs:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set android universal link
run: sed -i 's/bp.bitplatform.dev/adminpanel.bitplatform.dev/g' AdminPanel/src/Client/AdminPanel.Client.Maui/Platforms/Android/MainActivity.cs

- name: Install maui
run: cd src && dotnet workload install maui-android
Expand Down Expand Up @@ -283,16 +283,16 @@ jobs:
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database SqlServer --sample Admin
- name: Set iOS universal link
run: sed -i 's/bp.bitplatform.dev/adminpanel.bitplatform.dev/g' AdminPanel/src/Client/AdminPanel.Client.Maui/Platforms/iOS/Entitlements.plist
- name: Update appsettings.json api server address
uses: microsoft/variable-substitution@v1
with:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set iOS universal link
run: brew install gnu-sed && gsed -i 's/bp.bitplatform.dev/adminpanel.bitplatform.dev/g' AdminPanel/src/Client/AdminPanel.Client.Maui/Platforms/iOS/Entitlements.plist

- name: Install maui
run: cd src && dotnet workload install maui
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/todo-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ jobs:
- name: Enable pre rendering
run: sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs

- name: Set android universal link
run: sed -i 's/bp.bitplatform.dev/todo.bitplatform.dev/g' TodoSample/src/Client/TodoSample.Client.Maui/Platforms/Android/MainActivity.cs

- name: Generate CSS/JS files
run: dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks --no-restore

Expand Down Expand Up @@ -194,6 +191,9 @@ jobs:
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set android universal link
run: sed -i 's/bp.bitplatform.dev/todo.bitplatform.dev/g' TodoSample/src/Client/TodoSample.Client.Maui/Platforms/Android/MainActivity.cs

- name: Install maui
run: cd src && dotnet workload install maui-android
Expand Down Expand Up @@ -285,16 +285,16 @@ jobs:
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name TodoSample --database SqlServer --sample Todo
- name: Set iOS universal link
run: sed -i 's/bp.bitplatform.dev/todo.bitplatform.dev/g' TodoSample/src/Client/TodoSample.Client.Maui/Platforms/iOS/Entitlements.plist

- name: Update appsettings.json api server address
uses: microsoft/variable-substitution@v1
with:
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set iOS universal link
run: brew install gnu-sed && gsed -i 's/bp.bitplatform.dev/todo.bitplatform.dev/g' TodoSample/src/Client/TodoSample.Client.Maui/Platforms/iOS/Entitlements.plist

- name: Install maui
run: cd src && dotnet workload install maui
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static void Use(WebApplication app, IHostEnvironment env, IConfiguration

app.MapGet("/.well-known/apple-app-site-association", async () =>
{
// https://limitless-sierra-4673.herokuapp.com/
// https://branch.io/resources/aasa-validator/
var contentType = "application/json; charset=utf-8";
var path = Path.Combine("wwwroot/.well-known", "apple-app-site-association");
return Results.Stream(File.OpenRead(path), contentType, "apple-app-site-association");
Expand Down

0 comments on commit f0b137c

Please sign in to comment.