Skip to content

Commit 1bae1b5

Browse files
ncipollinaclaude
andauthored
ci: upgrade devops-templates to v10.0 with NuGet trusted publishing (#74)
Split publish jobs into build (shared template) and push (composite action) so OIDC job_workflow_ref matches the NuGet trusted publisher policy. Version-bump-only for pr-build, pr-title-check, release-drafter. Includes package updates from Directory.Packages.props. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fa7181b commit 1bae1b5

6 files changed

Lines changed: 40 additions & 15 deletions

File tree

.github/workflows/pr-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
permissions: write-all
88
jobs:
99
build:
10-
uses: LayeredCraft/devops-templates/.github/workflows/pr-build.yaml@v8.1
10+
uses: LayeredCraft/devops-templates/.github/workflows/pr-build.yaml@v10.0
1111
with:
1212
solution: LayeredCraft.Cdk.Constructs.slnx
1313
hasTests: true

.github/workflows/pr-title-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ permissions:
1010

1111
jobs:
1212
validate:
13-
uses: LayeredCraft/devops-templates/.github/workflows/pr-title-check.yml@v8.1
13+
uses: LayeredCraft/devops-templates/.github/workflows/pr-title-check.yml@v10.0

.github/workflows/publish-preview.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ on:
1212
- 'mkdocs.yml'
1313
- 'requirements.txt'
1414

15-
permissions: write-all
15+
permissions:
16+
contents: write
17+
pull-requests: write
1618

1719
jobs:
1820
# To add support for additional .NET versions (e.g. net9, net11), add release branches
1921
# (e.g. release/net9) and wire up separate caller workflows targeting those branches.
2022

21-
publish:
22-
uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@v8.1
23+
build:
24+
uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@v10.0
2325
with:
2426
solution: LayeredCraft.Cdk.Constructs.slnx
2527
dotnetVersion: |
@@ -29,4 +31,15 @@ jobs:
2931
11.0.x
3032
prereleaseIdentifier: alpha
3133
hasTests: true
32-
secrets: inherit
34+
secrets: inherit
35+
36+
push:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
permissions:
40+
id-token: write
41+
contents: read
42+
steps:
43+
- uses: LayeredCraft/devops-templates/.github/actions/nuget-push@v10.0
44+
with:
45+
nuget_user: ${{ secrets.NUGET_USER }}

.github/workflows/publish-release.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
release:
55
types: [published]
66

7-
permissions: write-all
7+
permissions:
8+
contents: write
89

910
jobs:
1011
# To add support for additional .NET versions (e.g. net9, net11), add release branches
1112
# (e.g. release/net9) and wire up separate caller workflows targeting those branches.
1213

13-
publish:
14-
uses: LayeredCraft/devops-templates/.github/workflows/publish-release.yml@v8.1
14+
build:
15+
uses: LayeredCraft/devops-templates/.github/workflows/publish-release.yml@v10.0
1516
with:
1617
solution: LayeredCraft.Cdk.Constructs.slnx
1718
dotnetVersion: |
@@ -20,4 +21,15 @@ jobs:
2021
10.0.x
2122
11.0.x
2223
hasTests: true
23-
secrets: inherit
24+
secrets: inherit
25+
26+
push:
27+
needs: build
28+
runs-on: ubuntu-latest
29+
permissions:
30+
id-token: write
31+
contents: read
32+
steps:
33+
- uses: LayeredCraft/devops-templates/.github/actions/nuget-push@v10.0
34+
with:
35+
nuget_user: ${{ secrets.NUGET_USER }}

.github/workflows/release-drafter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
draft:
17-
uses: LayeredCraft/devops-templates/.github/workflows/release-drafter.yml@v8.1
17+
uses: LayeredCraft/devops-templates/.github/workflows/release-drafter.yml@v10.0
1818
with:
1919
event_name: ${{ github.event_name }}
2020
pr_draft: ${{ github.event.pull_request.draft == true }}

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
</PropertyGroup>
55
<ItemGroup Label="Build">
6-
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.202" />
7-
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.6.2" />
6+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.300" />
7+
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.8.0" />
88
</ItemGroup>
99
<ItemGroup Label="AWS">
10-
<PackageVersion Include="Amazon.CDK.Lib" Version="2.250.0" />
10+
<PackageVersion Include="Amazon.CDK.Lib" Version="2.260.0" />
1111
</ItemGroup>
1212
<ItemGroup Label="Testing">
1313
<PackageVersion Include="AutoFixture" Version="4.18.1" />
1414
<PackageVersion Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
1515
<PackageVersion Include="AutoFixture.Xunit3" Version="4.19.0" />
1616
<PackageVersion Include="AwesomeAssertions" Version="9.4.0" />
17-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
17+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
1818
<PackageVersion Include="NSubstitute" Version="5.3.0" />
1919
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.2" />
2020
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />

0 commit comments

Comments
 (0)