Skip to content

Commit a0770f5

Browse files
chore: bootstrap ShellSyntaxTree from Akka template (#3)
Strip inherited Akka.NET build-system-template artifacts and stand up the agent operating system for the ShellSyntaxTree library: - Remove `.azure/`, `src/Akka.Console/`, `akkalogo.png`, `build.ps1`, legacy release-notes PowerShell, DocFX local tool, Akka.Hosting and Microsoft.Extensions.Hosting package references, Akka.Event global Using. - Rewrite `Directory.Build.props` and `Directory.Packages.props` for Aaron Stannard attribution, ShellSyntaxTree NuGet metadata, xUnit test stack, and SourceLink. `VersionPrefix=0.1.0`, `VersionSuffix=alpha`. - Rename `SampleSln.slnx` to `ShellSyntaxTree.slnx`; rewrite README to describe the library rather than the build template. - Update CI: `pr_validation.yml` runs build/test/pack and verifies copyright headers; `publish_nuget.yml` triggers on `v*.*.*` tags and computes the package version from the tag. - Add agent OS files: `PROJECT_CONTEXT.md`, `TOOLING.md`, `AGENTS.md`, `IMPLEMENTATION_PLAN.md`. `CLAUDE.md` is a symlink to `AGENTS.md`. - Add `SPEC.md` (the locked v0.1 contract). - Add `scripts/Add-FileHeaders.ps1` (Aaron Stannard copyright header enforcement, modeled on the Netclaw equivalent) covering `src/` and `tests/`. CI runs `-Verify`. - Generate and commit a NuGet package icon (`assets/icon.png`, 512x512) wired into `Directory.Build.props` via `PackageIcon`.
1 parent 80e276a commit a0770f5

29 files changed

Lines changed: 2191 additions & 510 deletions

.azure/azure-pipeline.template.yaml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.azure/pr-validation.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.azure/windows-release.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.config/dotnet-tools.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
"incrementalist"
99
],
1010
"rollForward": false
11-
},
12-
"docfx": {
13-
"version": "2.78.3",
14-
"commands": [
15-
"docfx"
16-
],
17-
"rollForward": false
1811
}
1912
}
20-
}
13+
}

.github/workflows/pr_validation.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ jobs:
3636
- name: "Restore .NET tools"
3737
run: dotnet tool restore
3838

39-
- name: "Update release notes"
39+
- name: "Verify copyright headers"
4040
shell: pwsh
41-
run: |
42-
./build.ps1
41+
run: ./scripts/Add-FileHeaders.ps1 -Verify
4342

44-
- name: "dotnet build"
45-
run: dotnet build -c Release
43+
- name: "dotnet restore"
44+
run: dotnet restore
4645

47-
# .NET Framework tests can't run reliably on Linux, so we only do .NET 8
46+
- name: "dotnet build"
47+
run: dotnet build -c Release --no-restore
4848

4949
- name: "dotnet test"
5050
shell: bash
51-
run: dotnet test -c Release
51+
run: dotnet test -c Release --no-build
5252

5353
- name: "dotnet pack"
54-
run: dotnet pack -c Release -o ./bin/nuget
54+
run: dotnet pack -c Release --no-build -o ./bin/nuget

.github/workflows/publish_nuget.yml

Lines changed: 51 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,69 @@ name: Publish NuGet
33
on:
44
push:
55
tags:
6-
- '*'
6+
- 'v*.*.*'
7+
- 'v*.*.*-*'
78

89
permissions:
9-
contents: write
10+
contents: write
1011

1112
jobs:
1213
publish-nuget:
13-
1414
name: publish-nuget
15-
runs-on: ${{ matrix.os }}
16-
strategy:
17-
matrix:
18-
os: [ubuntu-latest]
15+
runs-on: ubuntu-latest
1916

2017
steps:
21-
- name: "Checkout"
22-
uses: actions/checkout@v6.0.2
23-
with:
24-
lfs: true
25-
fetch-depth: 0
26-
27-
- name: "Install .NET SDK"
28-
uses: actions/setup-dotnet@v5.1.0
29-
with:
30-
global-json-file: "./global.json"
18+
- name: "Checkout"
19+
uses: actions/checkout@v6.0.2
20+
with:
21+
lfs: true
22+
fetch-depth: 0
3123

32-
- name: "Restore .NET tools"
33-
run: dotnet tool restore
24+
- name: "Install .NET SDK"
25+
uses: actions/setup-dotnet@v5.1.0
26+
with:
27+
global-json-file: "./global.json"
3428

35-
- name: "Update release notes"
36-
shell: pwsh
37-
run: |
38-
./build.ps1
29+
- name: "Restore .NET tools"
30+
run: dotnet tool restore
3931

40-
- name: Create Packages
41-
run: dotnet pack /p:PackageVersion=${{ github.ref_name }} -c Release -o ./output
32+
- name: "Compute package version from tag"
33+
shell: bash
34+
run: |
35+
# tag form is vX.Y.Z or vX.Y.Z-suffix
36+
TAG="${GITHUB_REF_NAME}"
37+
VERSION="${TAG#v}"
38+
echo "PACKAGE_VERSION=${VERSION}" >> "$GITHUB_ENV"
39+
echo "Publishing package version: ${VERSION}"
4240
43-
- name: Push Packages
44-
run: dotnet nuget push "output/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
41+
- name: "dotnet pack"
42+
run: dotnet pack /p:PackageVersion=${{ env.PACKAGE_VERSION }} -c Release -o ./output
4543

46-
- name: "Extract latest release notes"
47-
shell: pwsh
48-
run: |
49-
$content = Get-Content RELEASE_NOTES.md -Raw
50-
# Match from the first #### heading to just before the second one
51-
if ($content -match '(?s)(####.+?)(?=\n####|\z)') {
52-
$Matches[1].Trim() | Set-Content RELEASE_NOTES_LATEST.md
53-
} else {
54-
$content | Set-Content RELEASE_NOTES_LATEST.md
55-
}
44+
- name: "dotnet nuget push"
45+
run: dotnet nuget push "output/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
5646

57-
- name: release
58-
uses: actions/create-release@v1
59-
id: create_release
60-
with:
61-
draft: false
62-
prerelease: false
63-
release_name: 'Akka.Hosting ${{ github.ref_name }}'
64-
tag_name: ${{ github.ref }}
65-
body_path: RELEASE_NOTES_LATEST.md
66-
env:
67-
GITHUB_TOKEN: ${{ github.token }}
47+
- name: "Extract latest release notes"
48+
shell: pwsh
49+
run: |
50+
if (-not (Test-Path RELEASE_NOTES.md)) {
51+
"No release notes available." | Set-Content RELEASE_NOTES_LATEST.md
52+
exit 0
53+
}
54+
$content = Get-Content RELEASE_NOTES.md -Raw
55+
if ($content -match '(?s)(####.+?)(?=\n####|\z)') {
56+
$Matches[1].Trim() | Set-Content RELEASE_NOTES_LATEST.md
57+
} else {
58+
$content | Set-Content RELEASE_NOTES_LATEST.md
59+
}
6860
69-
- name: Upload Release Asset
70-
uses: AButler/upload-release-assets@v3.0
71-
with:
72-
repo-token: ${{ github.token }}
73-
release-tag: ${{ github.ref_name }}
74-
files: 'output/*.nupkg'
61+
- name: "Create GitHub release"
62+
uses: softprops/action-gh-release@v2
63+
with:
64+
name: "ShellSyntaxTree ${{ github.ref_name }}"
65+
tag_name: ${{ github.ref_name }}
66+
body_path: RELEASE_NOTES_LATEST.md
67+
files: output/*.nupkg
68+
draft: false
69+
prerelease: ${{ contains(github.ref_name, '-') }}
70+
env:
71+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)