Skip to content

Commit 60f5f38

Browse files
ncipollinaclaude
andauthored
ci(github): migrate to JSON-based NuGet versioning strategy (#35)
* feat(ci): migrate to JSON-based versioning strategy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(ci): update workflow refs to @main Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(ci): use 0.0.1 version prefix for testing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 80030c4 commit 60f5f38

5 files changed

Lines changed: 57 additions & 23 deletions

File tree

.github/workflows/build.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish Preview
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions: write-all
10+
11+
jobs:
12+
publish:
13+
uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@main
14+
with:
15+
solution: LayeredCraft.StructuredLogging.slnx
16+
packageId: LayeredCraft.StructuredLogging
17+
hasTests: true
18+
dotnetVersion: |
19+
8.0.x
20+
9.0.x
21+
10.0.x
22+
11.0.x
23+
secrets: inherit
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
permissions: write-all
9+
10+
jobs:
11+
publish:
12+
uses: LayeredCraft/devops-templates/.github/workflows/publish-release.yml@main
13+
with:
14+
solution: LayeredCraft.StructuredLogging.slnx
15+
packageId: LayeredCraft.StructuredLogging
16+
hasTests: true
17+
dotnetVersion: |
18+
8.0.x
19+
9.0.x
20+
10.0.x
21+
11.0.x
22+
secrets: inherit

LayeredCraft.StructuredLogging.slnx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<Solution>
22
<Folder Name="/git/">
33
<File Path=".github/dependabot.yml" />
4-
<File Path=".github/workflows/build.yaml" />
54
<File Path=".github/workflows/pr-build.yaml" />
5+
<File Path=".github/workflows/publish-preview.yaml" />
6+
<File Path=".github/workflows/publish-release.yaml" />
67
<File Path=".gitignore" />
78
</Folder>
89
<Folder Name="/Solution Items/">
910
<File Path="Directory.Build.props" />
1011
<File Path="Directory.Packages.props" />
12+
<File Path="eng/package-versioning.json" />
1113
<File Path="global.json" />
1214
<File Path="README.md" />
1315
</Folder>

eng/package-versioning.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/LayeredCraft/devops-templates/main/eng/package-versioning.schema.json",
3+
"packages": {
4+
"LayeredCraft.StructuredLogging": {
5+
"strategy": "single",
6+
"defaultVersionPrefix": "0.0.1"
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)