Skip to content

Commit

Permalink
feat: update to bit 6.0.0 #23 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi authored Oct 10, 2023
1 parent 4c175a7 commit c4fba0d
Show file tree
Hide file tree
Showing 65 changed files with 406 additions and 411 deletions.
91 changes: 45 additions & 46 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,51 @@
{
"name": "Bit Templates Playground",
"image": "mcr.microsoft.com/devcontainers/dotnet:0-7.0",
"hostRequirements": {
"cpus": 4
},
"waitFor": "onCreateCommand",
"onCreateCommand": "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs && dotnet dev-certs https --trust && dotnet tool install --global dotnet-ef --version 7.0.11 && dotnet ef database update --project src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj && dotnet build src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj",
"customizations": {
"codespaces": {
"openFiles": [
"src/Client/Core/Pages/Home/HomePage.razor"
]
"name": "Bit Templates Playground",
"hostRequirements": {
"cpus": 4
},
"vscode": {
"extensions": [
"ms-dotnettools.vscode-dotnet-runtime",
"kevin-chatham.aspnetcorerazor-html-css-class-completion",
"ms-dotnettools.csharp",
"yy0931.vscode-sqlite3-editor",
"glenn2223.live-sass"
]
}
},
"portsAttributes": {
"4030": {
"label": "Application",
"onAutoForward": "openPreview"
},
"4031": {
"label": "Application",
"onAutoForward": "openPreview"
"onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/764f2fec-710d-490d-a341-88636bce1a8d/35fc13fc20161a7d196200d9c2c6a8f0/dotnet-sdk-8.0.100-rc.1.23463.5-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && dotnet dev-certs https --trust && dotnet tool install --global dotnet-ef --version 8.0.0-rc.1.23419.6 && dotnet ef database update --project src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj && dotnet build src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj -t:BeforeBuildTasks --no-restore",
"waitFor": "onCreateCommand",
"customizations": {
"codespaces": {
"openFiles": [
"src/Client/Core/Pages/Home/HomePage.razor"
]
},
"vscode": {
"extensions": [
"ms-dotnettools.vscode-dotnet-runtime",
"kevin-chatham.aspnetcorerazor-html-css-class-completion",
"ms-dotnettools.csharp",
"yy0931.vscode-sqlite3-editor",
"glenn2223.live-sass"
]
}
},
"5030": {
"label": "Api",
"onAutoForward": "openPreview"
"portsAttributes": {
"4030": {
"label": "Application",
"onAutoForward": "openPreview"
},
"4031": {
"label": "Application",
"onAutoForward": "openPreview"
},
"5030": {
"label": "Api",
"onAutoForward": "openPreview"
},
"5031": {
"label": "Api",
"onAutoForward": "openPreview"
}
},
"5031": {
"label": "Api",
"onAutoForward": "openPreview"
"forwardPorts": [
4030,
4031,
5030,
5031
],
"remoteEnv": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"forwardPorts": [
4030,
4031,
5030,
5031
],
"remoteEnv": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
93 changes: 39 additions & 54 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,24 @@ jobs:
- name: Switch to blazor web assembly
run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj

- name: Restore workloads
run: >
dotnet workload install wasm-experimental &&
dotnet workload restore src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}"
- name: Install wasm
run: dotnet workload install wasm-tools wasm-experimental --sdk-version=8.0.100-rc.1.23463.5

- name: Build (To generate CSS/JS files)
run: dotnet build src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release
- name: Generate CSS/JS files
run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore

- name: Publish
run: dotnet publish src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web

- name: Build migrations bundle
run: |
dotnet tool install --global dotnet-ef --version 7.0.11
dotnet ef migrations bundle --self-contained -r linux-x64 --project src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj
cd src/Server/Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project Bit.TemplatePlayground.Server.Api.csproj
- name: Upload ef migrations bundle
uses: actions/upload-artifact@v3
with:
name: migrations-bundle
path: efbundle
path: src/Server/Api/efbundle

- name: Upload api-web artifact
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -146,27 +143,24 @@ jobs:
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-windows10.0.19041.0
- name: Install maui
run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5

- name: Build (To generate CSS/JS files)
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -f net7.0-windows10.0.19041.0
- name: Generate CSS/JS files
run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore

- name: Build exe
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -f net7.0-windows10.0.19041.0
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:UseRidGraph=true -f net8.0-windows10.0.19041.0

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: win-exe-bundle
path: src/Client/App/bin/release/net7.0-windows10.0.19041.0/win10-x86
path: src/Client/App/bin/release/net8.0-windows10.0.19041.0/win10-x86

build_blazor_hybrid_android:
name: build blazor hybrid (android)
runs-on: windows-2022
runs-on: ubuntu-22.04

steps:

Expand Down Expand Up @@ -196,30 +190,27 @@ jobs:
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-android
- name: Install maui
run: dotnet workload install maui-android --sdk-version=8.0.100-rc.1.23463.5

- name: Build (To generate CSS/JS files)
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:RunAOTCompilation=false -f net7.0-android
- name: Generate CSS/JS files
run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore

- name: Build aab
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Bit.TemplatePlayground.keystore" -p:AndroidSigningKeyAlias=Bit.TemplatePlayground -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net7.0-android
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Bit.TemplatePlayground.keystore" -p:AndroidSigningKeyAlias=Bit.TemplatePlayground -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android

- name: Build apk
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Bit.TemplatePlayground.keystore" -p:AndroidSigningKeyAlias=Bit.TemplatePlayground -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net7.0-android
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Bit.TemplatePlayground.keystore" -p:AndroidSigningKeyAlias=Bit.TemplatePlayground -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: android-bundle
path: src/Client/App/bin/release/net7.0-android/*-Signed.*
path: src/Client/App/bin/Release/net8.0-android/*-Signed.*

build_blazor_hybrid_maccatalyst:
name: build blazor hybrid (maccatalyst)
runs-on: macos-12
runs-on: macos-13

steps:

Expand All @@ -242,27 +233,24 @@ jobs:
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-maccatalyst
- name: Install maui
run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5

- name: Build (To generate CSS/JS files)
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net7.0-maccatalyst
- name: Generate CSS/JS files
run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore

- name: Build pkg
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net7.0-maccatalyst
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net8.0-maccatalyst

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: mac-pkg-bundle
path: src/Client/App/bin/release/net7.0-maccatalyst/*.pkg
path: src/Client/App/bin/release/net8.0-maccatalyst/*.pkg

build_blazor_hybrid_iOS:
name: build blazor hybrid (iOS)
runs-on: macos-12
runs-on: macos-13

steps:

Expand All @@ -285,11 +273,8 @@ jobs:
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-ios
- name: Install maui
run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5

- name: Extract iOS code signing certificate from env
uses: timheuer/base64-to-file@v1
Expand All @@ -312,17 +297,17 @@ jobs:
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY }}

- name: Build (To generate CSS/JS files)
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -m:1 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net7.0-ios
- name: Generate CSS/JS files
run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore

- name: Build ipa
run: dotnet publish src/Client/App/Bit.TemplatePlayground.Client.App.csproj -m:1 -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="${{ env.IOS_CODE_SIGN_PROVISION }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net7.0-ios
run: dotnet publish src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="${{ env.IOS_CODE_SIGN_PROVISION }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-ios

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: iOS-bundle
path: src/Client/App/bin/release/net7.0-ios/ios-arm64/publish/*.ipa
path: src/Client/App/bin/release/net8.0-ios/ios-arm64/publish/*.ipa

build_blazor_electron_linux:
name: build blazor electron (linux)
Expand Down Expand Up @@ -356,12 +341,12 @@ jobs:

- name: Switch to BlazorElectron
run: awk '/<BlazorMode>/{sub(">.*</", ">BlazorElectron</")}1' src/Directory.Build.props > temp.xml && mv temp.xml src/Directory.Build.props

- name: Restore workloads
run: dotnet workload restore src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj

- name: Build (To generate CSS/JS files)
run: dotnet build src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj -p:Configuration=Release
- name: Generate CSS/JS files
run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore

- name: Restore electron .net
run: dotnet build src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj -t:BeforeBuildTasks

- name: Build app image
run: cd src/Client/Web/ && dotnet electronize build /target linux
Expand Down
46 changes: 17 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

build-blazor-hybrid-android:
name: build blazor hybrid (android)
runs-on: windows-2022
runs-on: ubuntu-22.04

steps:

Expand All @@ -51,14 +51,11 @@ jobs:
with:
node-version: 18

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-android
- name: Install maui
run: dotnet workload install maui-android --sdk-version=8.0.100-rc.1.23463.5

- name: Build
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net7.0-android
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android

build-blazor-hybrid-windows:
name: build blazor hybrid (windows)
Expand All @@ -78,18 +75,15 @@ jobs:
with:
node-version: 18

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-windows10.0.19041.0
- name: Install maui
run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5

- name: Build
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net7.0-windows10.0.19041.0
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0

build-blazor-hybrid-iOS:
name: build blazor hybrid (iOS)
runs-on: macos-12
runs-on: macos-13

steps:

Expand All @@ -105,18 +99,15 @@ jobs:
with:
node-version: 18

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-ios
- name: Install maui
run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5

- name: Build
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net7.0-ios
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios

build-blazor-hybrid-maccatalyst:
name: build blazor hybrid (maccatalyst)
runs-on: macos-12
runs-on: macos-13

steps:

Expand All @@ -132,14 +123,11 @@ jobs:
with:
node-version: 18

- name: Install Maui
run: dotnet workload install maui

- name: Restore workloads
run: dotnet workload restore src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -f net7.0-maccatalyst
- name: Install maui
run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5

- name: Build
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net7.0-maccatalyst
run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst

build-blazor-api-wasm:
name: build blazor api + web assembly
Expand All @@ -162,8 +150,8 @@ jobs:
- name: Switch to blazor wasm
run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj

- name: Restore workloads
run: dotnet workload restore src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj -p:BlazorMode=BlazorWebAssembly
- name: Install wasm
run: dotnet workload install wasm-tools wasm-experimental --sdk-version=8.0.100-rc.1.23463.5

- name: Build
run: dotnet build src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}"
Loading

0 comments on commit c4fba0d

Please sign in to comment.