Skip to content

Commit 0137bf2

Browse files
Merge pull request #2 from TimeWarpEngineering/Cramer/2025-12-22/dev
Add dev-cli and GitHub Actions CI/CD workflow
2 parents eb9f46e + f66412e commit 0137bf2

26 files changed

+2721
-3
lines changed

.github/workflows/ci-cd.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'source/**'
9+
- 'tools/**'
10+
- '.github/workflows/**'
11+
- 'Directory.Build.props'
12+
- 'Directory.Packages.props'
13+
pull_request:
14+
branches:
15+
- master
16+
paths:
17+
- 'source/**'
18+
- 'tools/**'
19+
- '.github/workflows/**'
20+
- 'Directory.Build.props'
21+
- 'Directory.Packages.props'
22+
release:
23+
types: [published]
24+
workflow_dispatch:
25+
26+
jobs:
27+
ci:
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
id-token: write # Required for NuGet Trusted Publishing (OIDC)
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0 # Required for version detection
38+
39+
- name: Setup .NET
40+
uses: actions/setup-dotnet@v4
41+
with:
42+
dotnet-version: '10.0.x'
43+
44+
- name: NuGet login (OIDC Trusted Publishing)
45+
if: github.event_name == 'release'
46+
uses: nuget/login@v1
47+
with:
48+
user: TimeWarp.Enterprises
49+
50+
- name: Run CI Pipeline
51+
run: dotnet run --project tools/dev-cli/timewarp-terminal-dev-cli.csproj -- ci
52+
53+
- name: Upload Artifacts
54+
if: always()
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: Packages-${{ github.run_number }}
58+
path: artifacts/packages/*.nupkg
59+
if-no-files-found: ignore

.vscode/settings.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"peacock.remoteColor": "#07BE53",
3+
"timewarp.blurImagePath": "assets/timewarp-terminal-avatar.svg",
4+
"workbench.colorCustomizations": {
5+
"activityBar.activeBackground": "#09ef68",
6+
"activityBar.background": "#09ef68",
7+
"activityBar.foreground": "#15202b",
8+
"activityBar.inactiveForeground": "#15202b99",
9+
"activityBarBadge.background": "#a265f9",
10+
"activityBarBadge.foreground": "#15202b",
11+
"commandCenter.border": "#e7e7e799",
12+
"sash.hoverBorder": "#09ef68",
13+
"statusBar.background": "#07be53",
14+
"statusBar.foreground": "#e7e7e7",
15+
"statusBarItem.hoverBackground": "#09ef68",
16+
"statusBarItem.remoteBackground": "#07be53",
17+
"statusBarItem.remoteForeground": "#e7e7e7",
18+
"titleBar.activeBackground": "#07be53",
19+
"titleBar.activeForeground": "#e7e7e7",
20+
"titleBar.inactiveBackground": "#07be5399",
21+
"titleBar.inactiveForeground": "#e7e7e799"
22+
}
23+
}

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<PackageVersion Include="TimeWarp.Jaribu" Version="1.0.0-beta.7" />
2929
<PackageVersion Include="TimeWarp.Build.Tasks" Version="1.0.0" />
3030
<PackageVersion Include="TimeWarp.OptionsValidation" Version="1.0.0-beta.4" />
31+
<PackageVersion Include="TimeWarp.Nuru" Version="3.0.0-beta.22" />
3132
<PackageVersion Include="TimeWarp.Nuru.Parsing" Version="$(Version)" />
3233
<PackageVersion Include="TimeWarp.Nuru.Analyzers" Version="$(Version)" />
3334
</ItemGroup>
File renamed without changes.
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Create dev-cli tool for timewarp-terminal
2+
3+
## Description
4+
5+
Create a development CLI tool for the `timewarp-terminal` repository following the patterns established in `timewarp-nuru`'s dev-cli. This will provide CI/CD orchestration and development workflow automation.
6+
7+
## Checklist
8+
9+
- [ ] Fix `msbuild/repository.props` - Update `RepositoryName` and `SolutionFile` from `timewarp-nuru` to `timewarp-terminal`
10+
- [ ] Update `Directory.Packages.props` - Add `TimeWarp.Nuru` version `3.0.0-beta.22`
11+
- [ ] Create `tools/dev-cli/timewarp-terminal-dev-cli.csproj` with AOT support, project reference to timewarp-terminal, and package references to TimeWarp.Nuru, Mediator, TimeWarp.Amuru
12+
- [ ] Create `tools/dev-cli/Directory.Build.props` with CLI-specific warning suppressions
13+
- [ ] Create `tools/dev-cli/global-usings.cs`
14+
- [ ] Create `tools/dev-cli/program.cs` entry point using NuruApp builder pattern
15+
- [ ] Create `tools/dev-cli/commands/build-command.cs` - Build timewarp-terminal library
16+
- [ ] Create `tools/dev-cli/commands/clean-command.cs` - Clean solution and artifacts
17+
- [ ] Create `tools/dev-cli/commands/test-command.cs` - Run tests (TODO placeholder until tests exist)
18+
- [ ] Create `tools/dev-cli/commands/verify-samples-command.cs` - Verify samples compile (TODO placeholder until samples exist)
19+
- [ ] Create `tools/dev-cli/commands/check-version-command.cs` - Check NuGet publishing status for TimeWarp.Terminal
20+
- [ ] Create `tools/dev-cli/commands/ci-command.cs` - CI pipeline orchestration with mode detection
21+
- [ ] Update `timewarp-terminal.slnx` - Add dev-cli project to solution
22+
- [ ] Verify build succeeds with `dotnet build`
23+
24+
## Notes
25+
26+
### Reference Implementation
27+
Pattern follows `timewarp-nuru/tools/dev-cli/`:
28+
- Uses TimeWarp.Nuru framework with `[NuruRoute]` attributed routes
29+
- Mediator pattern with nested `Handler : ICommandHandler<TCommand, Unit>` classes
30+
- All output through `ITerminal` interface for testability
31+
- Shell operations via `TimeWarp.Amuru.Shell.Builder()` and `DotNet.*` helpers
32+
- Commands throw `InvalidOperationException` for failures
33+
34+
### Key Adaptations from timewarp-nuru
35+
- Look for `timewarp-terminal.slnx` instead of `timewarp-nuru.slnx`
36+
- Build only `source/timewarp-terminal/timewarp-terminal.csproj`
37+
- Check only `TimeWarp.Terminal` package on NuGet
38+
- Read version from `source/timewarp-terminal/timewarp-terminal.csproj` (version is defined there, not in `source/Directory.Build.props`)
39+
40+
### Commands
41+
| Command | Route | Description |
42+
|---------|-------|-------------|
43+
| build | `build --clean,-c? --verbose,-v?` | Build timewarp-terminal library |
44+
| clean | `clean` | Clean solution and delete bin/obj |
45+
| test | `test` | Run tests (placeholder with TODO) |
46+
| verify-samples | `verify-samples` | Verify samples compile (placeholder with TODO) |
47+
| check-version | `check-version` | Check if TimeWarp.Terminal is already published |
48+
| ci | `ci --mode,-m?` | Orchestrate CI pipeline |
49+
50+
### Dependencies
51+
- `TimeWarp.Nuru` v3.0.0-beta.22 (PackageReference)
52+
- `TimeWarp.Amuru` (PackageReference - already in Directory.Packages.props)
53+
- `Mediator.Abstractions` + `Mediator.SourceGenerator` (already in Directory.Packages.props)
54+
- `timewarp-terminal.csproj` (ProjectReference - in-repo)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Add GitHub Actions CI workflow
2+
3+
## Description
4+
5+
Create a GitHub Actions workflow that runs the dev-cli CI pipeline on push, pull request, and release events.
6+
7+
## Checklist
8+
9+
- [ ] Create `.github/workflows/ci-cd.yml`
10+
- [ ] Configure triggers for push, pull_request, release, and workflow_dispatch
11+
- [ ] Setup .NET 10.0
12+
- [ ] Configure NuGet OIDC trusted publishing for releases
13+
- [ ] Run dev-cli ci command
14+
- [ ] Upload package artifacts
15+
16+
## Notes
17+
18+
### Reference
19+
Based on timewarp-nuru's `.github/workflows/ci-cd.yml` pattern.
20+
21+
### Triggers
22+
- `push` to master (with path filters)
23+
- `pull_request` to master (with path filters)
24+
- `release` published
25+
- `workflow_dispatch` for manual runs
26+
27+
### Path Filters
28+
Only run on changes to:
29+
- `source/**`
30+
- `tools/**`
31+
- `.github/workflows/**`
32+
- `Directory.Build.props`
33+
- `Directory.Packages.props`

kanban/task-template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Task Title
2+
3+
## Summary
4+
Brief description of what this task accomplishes.
5+
6+
## Todo List
7+
- [ ] Task item 1
8+
- [ ] Task item 2
9+
- [ ] Task item 3
10+
11+
## Notes
12+
Context, implementation details, decisions, and important information to preserve across AI sessions.
13+
14+
## Results
15+
Outcomes, metrics, observations, and decisions made during completion. Added after task is done.

msbuild/repository.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project>
22
<!-- Repository path definitions - can be imported standalone without build configuration -->
33
<PropertyGroup Label="Repository Structure">
4-
<RepositoryName>timewarp-nuru</RepositoryName>
4+
<RepositoryName>timewarp-terminal</RepositoryName>
55
<RepositoryRoot>$(MSBuildThisFileDirectory)../</RepositoryRoot>
6-
<SolutionFile>$(RepositoryRoot)timewarp-nuru.slnx</SolutionFile>
6+
<SolutionFile>$(RepositoryRoot)timewarp-terminal.slnx</SolutionFile>
77
<SourceDirectory>$(RepositoryRoot)source/</SourceDirectory>
88
<TestsDirectory>$(RepositoryRoot)tests/</TestsDirectory>
99
<SamplesDirectory>$(RepositoryRoot)samples/</SamplesDirectory>

source/timewarp-terminal/timewarp-terminal.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<None Include="readme.md" Pack="true" PackagePath="" />
22+
<None Include="../../README.md" Pack="true" PackagePath="" />
2323
</ItemGroup>
2424

2525
</Project>

0 commit comments

Comments
 (0)