Skip to content

Commit

Permalink
feat: update to bit 9.0.0 #59 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi authored Nov 18, 2024
1 parent d38edba commit 839c810
Show file tree
Hide file tree
Showing 487 changed files with 10,775 additions and 8,213 deletions.
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "Bit.TemplatePlayground",
"image": "mcr.microsoft.com/dotnet/sdk:8.0",
"image": "mcr.microsoft.com/dotnet/sdk:9.0",
"hostRequirements": {
"cpus": 4
},
"onCreateCommand": "dotnet dev-certs https --trust && dotnet workload install wasm-tools",
"onCreateCommand": "dotnet workload install wasm-tools",
"waitFor": "onCreateCommand",
"customizations": {
"codespaces": {
Expand All @@ -24,9 +24,9 @@
}
},
"forwardPorts": [
4138,
4052,
5000,
5276
5054
],
"features": {
"ghcr.io/devcontainers/features/node": {},
Expand Down
59 changes: 23 additions & 36 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

build_api_blazor:
name: build api + blazor web
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:

Expand All @@ -33,15 +33,12 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

# - name: Enable pre rendering
# run: sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' src/Client/Bit.TemplatePlayground.Client.Core/Services/AppRenderMode.cs

- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Shared/appsettings.json'
files: 'src/Shared/appsettings.json, src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Client/Bit.TemplatePlayground.Client.Web/appsettings.json'
env:
ServerAddress: ${{ env.SERVER_ADDRESS }}

Expand Down Expand Up @@ -69,11 +66,12 @@ jobs:
with:
name: server-bundle
path: ${{env.DOTNET_ROOT}}/server
include-hidden-files: true # Required for wwwroot/.well-known folder

deploy_api_blazor:
name: deploy api + blazor
needs: build_api_blazor
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
Expand Down Expand Up @@ -140,36 +138,25 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'src\Client\Bit.TemplatePlayground.Client.Core\appsettings.json, src\Shared\appsettings.json'
files: 'src\Shared\appsettings.json, src\Client\Bit.TemplatePlayground.Client.Core\appsettings.json, src\Client\Bit.TemplatePlayground.Client.Windows\appsettings.json'
env:
ServerAddress: ${{ env.SERVER_ADDRESS }}
WindowsUpdateSettings.FilesUrl: 'https://use-your-server-url-here.com/windows' # Deploy the published Windows application files to your desired hosting location and use the host url here.
WindowsUpdate.FilesUrl: 'https://use-your-server-url-here.com/windows' # Deploy the published Windows application files to your desired hosting location and use the host url here.

- name: Generate CSS/JS files
run: dotnet build src\Client\Bit.TemplatePlayground.Client.Core\Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore -c Release

- name: Publish
run: |
cd src\Client\Bit.TemplatePlayground.Client.Windows\
dotnet publish Bit.TemplatePlayground.Client.Windows.csproj -c Release -o .\bin\publish-arm64 -r win-arm64
ren .\bin\publish-arm64\Bit.TemplatePlayground.Client.Windows.exe Bit.TemplatePlayground.Client.Windows-arm64.exe
dotnet publish Bit.TemplatePlayground.Client.Windows.csproj -c Release -o .\bin\publish-x86 -r win-x86
ren .\bin\publish-x86\Bit.TemplatePlayground.Client.Windows.exe Bit.TemplatePlayground.Client.Windows-x86.exe
dotnet publish Bit.TemplatePlayground.Client.Windows.csproj -c Release -o .\bin\publish-x64 -r win-x64
ren .\bin\publish-x64\Bit.TemplatePlayground.Client.Windows.exe Bit.TemplatePlayground.Client.Windows-x64.exe
dotnet publish Bit.TemplatePlayground.Client.Windows.csproj -c Release -o .\bin\publish
del .\bin\publish\Bit.TemplatePlayground.Client.Windows.exe
echo D | xcopy .\bin\publish-arm64 .\publish-result /s /e /h
echo A | xcopy .\bin\publish-x86 .\publish-result /s /e /h
echo A | xcopy .\bin\publish-x64 .\publish-result /s /e /h
echo A | xcopy .\bin\publish .\publish-result /s /e /h
cd src\Client\Bit.TemplatePlayground.Client.Windows\
dotnet publish Bit.TemplatePlayground.Client.Windows.csproj -c Release -o .\publish-result -r win-x86 -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}"
dotnet tool restore
dotnet vpk pack -u Bit.TemplatePlayground.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Bit.TemplatePlayground.Client.Windows-x86.exe -r win-x86 --framework net8.0.8-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Bit.TemplatePlayground'
dotnet vpk pack -u Bit.TemplatePlayground.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Bit.TemplatePlayground.Client.Windows.exe -r win-x86 --framework net9.0-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Bit.TemplatePlayground'
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -179,7 +166,7 @@ jobs:

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

steps:

Expand All @@ -193,7 +180,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Extract Android signing key from env
uses: timheuer/base64-to-file@v1.2
Expand All @@ -205,7 +192,7 @@ jobs:
- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Shared/appsettings.json'
files: 'src/Shared/appsettings.json, src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Client/Bit.TemplatePlayground.Client.Maui/appsettings.json'
env:
ServerAddress: ${{ env.SERVER_ADDRESS }}

Expand All @@ -221,20 +208,20 @@ jobs:
dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -t:BeforeBuildTasks --no-restore -c Release
- name: Build aab
run: dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -c 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
run: dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -c 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 net9.0-android

- name: Build apk
run: dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -c 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
run: dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -c 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 net9.0-android

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: android-bundle
path: src/Client/Bit.TemplatePlayground.Client.Maui/bin/Release/net8.0-android/*-Signed.*
path: src/Client/Bit.TemplatePlayground.Client.Maui/bin/Release/net9.0-android/*-Signed.*

build_blazor_hybrid_iOS:
name: build blazor hybrid (iOS-macOS)
runs-on: macos-14
runs-on: macOS-15

steps:

Expand All @@ -248,16 +235,16 @@ jobs:

- uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: '15.4'
xcode-version: '16.0'

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Shared/appsettings.json'
files: 'src/Shared/appsettings.json, src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Client/Bit.TemplatePlayground.Client.Maui/appsettings.json'
env:
ServerAddress: ${{ env.SERVER_ADDRESS }}

Expand All @@ -284,10 +271,10 @@ jobs:
dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -t:BeforeBuildTasks --no-restore -c Release
- name: Build ipa
run: dotnet publish src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -p:RuntimeIdentifier=ios-arm64 -c 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
run: dotnet publish src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -p:RuntimeIdentifier=ios-arm64 -c 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 net9.0-ios

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: iOS-bundle
path: src/Client/Bit.TemplatePlayground.Client.Maui/bin/release/net8.0-ios/ios-arm64/publish/*.ipa
path: src/Client/Bit.TemplatePlayground.Client.Maui/bin/release/net9.0-ios/ios-arm64/publish/*.ipa
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,36 @@ jobs:

build_blazor_server:
name: build blazor
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:

- name: Checkout source code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Build
run: dotnet build Bit.TemplatePlayground.sln -c Release

- name: Install Playwright
run: pwsh src/Tests/bin/Debug/net8.0/playwright.ps1 install --with-deps

- name: Test
run: dotnet test src/Tests/Bit.TemplatePlayground.Tests.csproj
id: test
run: dotnet test src/Tests/Bit.TemplatePlayground.Tests.csproj --logger GitHubActions

- name: Upload Tests Artifact
uses: actions/upload-artifact@v4.4.1
if: ${{ failure() && steps.test.conclusion == 'failure' }}
with:
name: tests-artifact
path: ./src/Tests/TestResults
retention-days: 14
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,6 @@ custom.aprof
/src/**/App_Data/*

/src/Client/Bit.TemplatePlayground.Client.Core/wwwroot/scripts/app*.js
/src/Client/Bit.TemplatePlayground.Client.Maui/Platforms/Android/google-services.json

.env
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"liveSassCompile.settings.watchOnLaunch": true,
"dotnet.defaultSolution": "Bit.TemplatePlayground.Web.slnf",
"dotnet.unitTests.runSettingsPath": "src/Tests/.runsettings",
"csharp.preview.improvedLaunchExperience": true,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
Expand Down
6 changes: 3 additions & 3 deletions Bit.TemplatePlayground.Web.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"solution": {
"path": "Bit.TemplatePlayground.sln",
"projects": [
"src\\Server\\Bit.TemplatePlayground.Server.Web\\Bit.TemplatePlayground.Server.Web.csproj",
"src\\Server\\Bit.TemplatePlayground.Server.Api\\Bit.TemplatePlayground.Server.Api.csproj",
"src\\Shared\\Bit.TemplatePlayground.Shared.csproj",
"src\\Client\\Bit.TemplatePlayground.Client.Core\\Bit.TemplatePlayground.Client.Core.csproj",
"src\\Client\\Bit.TemplatePlayground.Client.Web\\Bit.TemplatePlayground.Client.Web.csproj",
"src\\Server\\Bit.TemplatePlayground.Server.Api\\Bit.TemplatePlayground.Server.Api.csproj",
"src\\Server\\Bit.TemplatePlayground.Server.Web\\Bit.TemplatePlayground.Server.Web.csproj",
"src\\Shared\\Bit.TemplatePlayground.Shared.csproj",
"src\\Tests\\Bit.TemplatePlayground.Tests.csproj"
]
}
Expand Down
2 changes: 2 additions & 0 deletions Bit.TemplatePlayground.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".SolutionItems", ".Solution
.editorconfig = .editorconfig
.gitignore = .gitignore
.vsconfig = .vsconfig
settings.VisualStudio.json = settings.VisualStudio.json
Clean.bat = Clean.bat
src\Directory.Build.props = src\Directory.Build.props
src\Directory.Packages.props = src\Directory.Packages.props
global.json = global.json
README.md = README.md
EndProjectSection
Expand Down
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
## Welcome!
# Bit Templates Playground

Thank you for creating a new project with bit platform! We appreciate your trust in our platform and are excited to see what you'll build.
With [GitHub Codespaces](https://github.com/features/codespaces), you can access the ultimate online development platform, right in your browser - no downloads or installations required!

## Documentation
Experience lightning-fast speeds and seamless integration as you dive into the world of Bit BlazorUI, and elevate your web development game to new heights.

To help you get started, we have comprehensive documentation available. You can find detailed guides, samples, and more at:
[![Open in Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/bitfoundation/bit-templates-playground/tree/develop)

[bitplatform.dev/templates](https://bitplatform.dev/templates/overview)
**Instructions:**

If you have any questions or need further assistance, feel free to [reach out](https://github.com/bitfoundation/bitplatform/issues/new/choose). Happy coding!
Run `cd src/Server/Bit.TemplatePlayground.Server.Web && dotnet run`, then sign-in using `test@bitplatform.dev`, `123456` and explorer features.

---
This sample project gets created by the following command:
```bash
dotnet new install Bit.Boilerplate && dotnet new bit-bp --name Bit.TemplatePlayground --database sqlite --sample admin
```

The **bit platform** team.
Note: In order to view sign-up's `confirmation email`, read [Email settings docs](https://bitplatform.dev/templates/settings).
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.400",
"rollForward": "latestFeature"
"version": "9.0.100",
"rollForward": "latestPatch"
}
}
6 changes: 6 additions & 0 deletions settings.VisualStudio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* Visual Studio Settings File */
{
"debugging.general.disableJITOptimization": true,
"environment.documents.saveWithSpecificEncoding": true,
"environment.documents.saveEncoding": "utf-8;65001"
}
Loading

0 comments on commit 839c810

Please sign in to comment.