Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5e7acae
Console template
woksin Feb 10, 2026
eec88d6
Add Cratis Chronicle Console and Web Application templates
woksin Feb 10, 2026
8cb033b
Add Chronicle Web application template with initial setup
woksin Feb 10, 2026
f609cc3
Enhance templates by adding post-action instructions and updating pac…
woksin Feb 13, 2026
41640c1
Add installation script and enhance template configurations
woksin Feb 14, 2026
02d18d9
Update Chronicle Web App configuration and streamline initialization
woksin Feb 23, 2026
34910fe
Renaming to get the postfix .sh
einari Feb 23, 2026
028b336
Refactor Chronicle templates: consolidate event handling and enhance …
woksin Feb 24, 2026
f8aa421
Merge branch 'templates' of github.com:Cratis/Templates into templates
woksin Feb 24, 2026
c060b76
Enhance Cratis template: update configuration, add frontend support, …
woksin Feb 24, 2026
c422b47
Update workflows and templates: enhance build process, improve README…
woksin Feb 24, 2026
5539f6d
Fix script source path in index.html for correct module loading
woksin Feb 24, 2026
255201c
Initial plan
Copilot Mar 1, 2026
1f11583
Improve Cratis Web template with @cratis/components, DataTableForObse…
Copilot Mar 1, 2026
8c6d92a
Fix CI build: IncludeBuildOutput=false and use IMongoCollection.Obser…
Copilot Mar 1, 2026
81136e6
Enhance Cratis template: add MongoDB package installation instruction…
woksin Mar 1, 2026
4940c67
Merge branch 'templates' into copilot/sub-pr-1
einari Mar 1, 2026
a4423b2
Merge pull request #2 from Cratis:copilot/sub-pr-1
einari Mar 1, 2026
8c8c6ad
Adding explicit uninstall script
einari Mar 1, 2026
c73cd5c
Configuring the frontend a bit nicer
einari Mar 1, 2026
00e1fca
Fixing namespces
einari Mar 1, 2026
e056eb2
Final touches
einari Mar 1, 2026
6b1eef1
Improving cohesion
einari Mar 2, 2026
fd0d3be
Fixing import for the SomeFeature
einari Mar 2, 2026
9acf22d
Fixing output of Cratis proxies to be root and only skip one segment,…
einari Mar 2, 2026
6c5f537
Cutting down the global usings, as we "inherit" a GlobalUsings from t…
einari Mar 2, 2026
969cc79
Updating to be more accurate
einari Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 52 additions & 24 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ on:
branches:
- "main"
paths:
- "Source/DotNET/**"
- "Specifications/**"
- "Cratis.Templates.csproj"
- "Templates/**"
- ".github/workflows/dotnet-build.yml"
pull_request:
branches:
- "**"
paths:
- "Source/DotNET/**"
- "Specifications/**"
- "Cratis.Templates.csproj"
- "Templates/**"
- ".github/workflows/dotnet-build.yml"

jobs:
build:
Expand All @@ -46,27 +48,53 @@ jobs:
${{ env.DOTNET9_VERSION }}
${{ env.DOTNET10_VERSION }}

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 23.x
registry-url: "https://registry.npmjs.org"
- name: Restore
run: dotnet restore Cratis.Templates.csproj

- uses: actions/cache@v3
id: yarn-cache
with:
path: |
.yarn/cache
**/node_modules
**/.eslintcache
**/yarn.lock
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
- name: Validate package
run: dotnet pack Cratis.Templates.csproj --no-build --configuration Release -o ./Artifacts/NuGet -p:PackageVersion=0.0.0-ci

- name: Validate templates generate buildable projects
shell: bash
run: |
./install-local.sh

validation_root="$(mktemp -d)"
echo "Using validation root: $validation_root"

run_dotnet_new() {
set +o pipefail
yes | "$@"
local status=$?
set -o pipefail
return $status
}

build_generated_project() {
local project_root="$1"
local solution_file
local project_file

solution_file="$(find "$project_root" -maxdepth 1 -name '*.sln' | head -n 1)"
if [[ -n "$solution_file" ]]; then
dotnet build "$solution_file" --configuration Release
return
fi

project_file="$(find "$project_root" -maxdepth 1 -name '*.csproj' | head -n 1)"
if [[ -z "$project_file" ]]; then
echo "No .sln or .csproj found in $project_root"
return 1
fi

dotnet build "$project_file" --configuration Release
}

- name: Yarn install
run: yarn
run_dotnet_new dotnet new cratis-chronicle-console -n ValidateChronicleConsole -o "$validation_root/ValidateChronicleConsole" --Framework net10.0
build_generated_project "$validation_root/ValidateChronicleConsole"

- name: Build
run: dotnet build --configuration Release
run_dotnet_new dotnet new cratis-chronicle-web -n ValidateChronicleWeb -o "$validation_root/ValidateChronicleWeb" --Framework net10.0
build_generated_project "$validation_root/ValidateChronicleWeb"

- name: Test
run: dotnet test --configuration Release --no-build
run_dotnet_new dotnet new cratis -n ValidateCratis -o "$validation_root/ValidateCratis" --Framework net10.0 --EnableFrontend false
build_generated_project "$validation_root/ValidateCratis"
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
version: ${{ github.event.inputs.version }}
release-notes: ${{ github.event.inputs.release-notes }}

publish-dotnet-packages:
publish-dotnet-package:
if: needs.release.outputs.publish == 'true'
runs-on: ubuntu-latest
needs: [release]
Expand All @@ -76,12 +76,12 @@ jobs:
- name: Remove any existing artifacts
run: rm -rf ${{ env.NUGET_OUTPUT }}

- name: Build
run: dotnet build --configuration Release
- name: Restore
run: dotnet restore Cratis.Templates.csproj

- name: Create NuGet packages
run: dotnet pack --no-build --configuration Release -o ${{ env.NUGET_OUTPUT }} -p:PackageVersion=${{ needs.release.outputs.version }}
- name: Create NuGet package
run: dotnet pack Cratis.Templates.csproj --no-build --configuration Release -o ${{ env.NUGET_OUTPUT }} -p:PackageVersion=${{ needs.release.outputs.version }}

- name: Push NuGet packages
- name: Push NuGet package
run: dotnet nuget push --skip-duplicate '${{ env.NUGET_OUTPUT }}/*.nupkg' --timeout 900 --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

29 changes: 18 additions & 11 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Prerelase
name: PR Prerelease

env:
NUGET_OUTPUT: ./Artifacts/NuGet
Expand All @@ -13,7 +13,8 @@ on:
branches:
- "**"
paths:
- "Source/**"
- "Cratis.Templates.csproj"
- "Templates/**"
- ".github/workflows/**"

jobs:
Expand All @@ -32,7 +33,7 @@ jobs:
id: release
uses: cratis/release-action@v1

publish-nuget-packages:
publish-nuget-package:
if: needs.release.outputs.publish == 'true'
runs-on: ubuntu-latest
needs: [release]
Expand All @@ -52,24 +53,30 @@ jobs:
- name: Remove any existing artifacts
run: rm -rf ${{ env.NUGET_OUTPUT }}

- name: Build
run: dotnet build --configuration Debug
- name: Restore
run: dotnet restore Cratis.Templates.csproj

- name: Add GitHub Package Registry to NuGet
run: dotnet nuget add source --name github --username cratis --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text ${{ env.NUGET_SOURCE }}

- name: Create NuGet packages
run: dotnet pack --no-build --configuration Debug -o ${{ env.NUGET_OUTPUT }} -p:PackageVersion=${{ needs.release.outputs.version }}
- name: Create NuGet package
run: dotnet pack Cratis.Templates.csproj --no-build --configuration Debug -o ${{ env.NUGET_OUTPUT }} -p:PackageVersion=${{ needs.release.outputs.version }}

- name: Push NuGet packages
- name: Push NuGet package
run: dotnet nuget push '${{ env.NUGET_OUTPUT }}/*.nupkg' --skip-duplicate --timeout 900 --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"

- name: Add comment for NuGet packages
- name: Add comment for NuGet package
uses: mshick/add-pr-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: |
NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=${{ needs.release.outputs.version }}
NuGet package for this PR:
Cratis.Templates ${{ needs.release.outputs.version }}

Install with:
dotnet new install Cratis.Templates::${{ needs.release.outputs.version }} --nuget-source https://nuget.pkg.github.com/cratis/index.json

Package page:
https://github.com/orgs/cratis/packages/nuget/package/Cratis.Templates
allow-repeats: false
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

Testing
.buildsettings

# User-specific files
Expand Down
8 changes: 5 additions & 3 deletions Cratis.Templates.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<PackageType>Template</PackageType>
<PackageId>Cratis.Templates</PackageId>
<PackageVersion>1.0.0</PackageVersion>
Expand All @@ -12,14 +13,15 @@
<License>MIT</License>
<IncludeContentInPack>true</IncludeContentInPack>
<NoWarn>$(NoWarn);CS8805;CS0103;IDE0073;SA1512;SA1515;SA1005</NoWarn>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Cratis\**\*" />
<None Remove="Cratis\**\*" />
<Compile Remove="Templates\**\*" />
<None Remove="Templates\**\*" />
</ItemGroup>

<ItemGroup>
<Content Include="Cratis/**/*" />
<Content Include="Templates/**/*" />
</ItemGroup>
</Project>
14 changes: 0 additions & 14 deletions Cratis/App.css

This file was deleted.

25 changes: 0 additions & 25 deletions Cratis/App.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions Cratis/CratisApp.csproj

This file was deleted.

84 changes: 0 additions & 84 deletions Cratis/README.md

This file was deleted.

Loading