From d3d2be1f0e244033308a844aec03d3e78d55f055 Mon Sep 17 00:00:00 2001 From: Jason Tucker Date: Mon, 19 Oct 2026 17:12:34 -0400 Subject: [PATCH 1/4] Use LogosPackages for shared NuGet publishing Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- conventions/faithlife-dotnet-library-workflow/README.md | 2 ++ .../faithlife-dotnet-library-workflow/convention.Tests.ps1 | 6 ++++-- conventions/faithlife-dotnet-library-workflow/files/ci.yml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conventions/faithlife-dotnet-library-workflow/README.md b/conventions/faithlife-dotnet-library-workflow/README.md index 3802f03..a381292 100644 --- a/conventions/faithlife-dotnet-library-workflow/README.md +++ b/conventions/faithlife-dotnet-library-workflow/README.md @@ -9,6 +9,8 @@ Installs the published Faithlife .NET library workflows at `.github/workflows/ci The convention copies the workflows from [files/ci.yml](./files/ci.yml) and [files/copilot-setup-steps.yml](./files/copilot-setup-steps.yml), and overwrites the target files when they differ. +NuGet publishing uses Trusted Publishing with the shared `LogosPackages` account rather than a personal account. Before adopting the workflow, ensure that `LogosPackages` has permission to publish the repository's packages and a matching NuGet Trusted Publishing policy for the repository and workflow. + ## Example ```yaml diff --git a/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 b/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 index 498500b..0039e49 100644 --- a/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 +++ b/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 @@ -67,6 +67,7 @@ Describe 'faithlife-dotnet-library-workflow convention' { # Assert the published workflow was created and reported. (Test-Path -LiteralPath $ciWorkflowPath) | Should -Be $true (Get-Content -LiteralPath $ciWorkflowPath -Raw) | Should -Be (Get-Content -LiteralPath $expectedWorkflowPaths['ci.yml'] -Raw) + (Get-Content -LiteralPath $ciWorkflowPath -Raw) | Should -Match '(?m)^ user: LogosPackages\r?$' (Test-Path -LiteralPath $copilotSetupWorkflowPath) | Should -Be $true (Get-Content -LiteralPath $copilotSetupWorkflowPath -Raw) | Should -Be (Get-Content -LiteralPath $expectedWorkflowPaths['copilot-setup-steps.yml'] -Raw) $status.Count | Should -Be 2 @@ -84,12 +85,13 @@ Describe 'faithlife-dotnet-library-workflow convention' { $testDirectory = New-TemporaryDirectory try { - # Arrange a repository with a committed placeholder workflow. + # Arrange a repository with the previous publishing account and a placeholder setup workflow. Initialize-TestRepository -Path $testDirectory $ciWorkflowPath = Join-Path $testDirectory '.github/workflows/ci.yml' $copilotSetupWorkflowPath = Join-Path $testDirectory '.github/workflows/copilot-setup-steps.yml' New-Item -ItemType Directory -Path (Split-Path -Parent $ciWorkflowPath) -Force | Out-Null - [System.IO.File]::WriteAllText($ciWorkflowPath, "name: Placeholder`n", $utf8) + $previousCiWorkflow = (Get-Content -LiteralPath $expectedWorkflowPaths['ci.yml'] -Raw).Replace('user: LogosPackages', 'user: bgrainger') + [System.IO.File]::WriteAllText($ciWorkflowPath, $previousCiWorkflow, $utf8) [System.IO.File]::WriteAllText($copilotSetupWorkflowPath, "name: Placeholder`n", $utf8) Push-Location $testDirectory diff --git a/conventions/faithlife-dotnet-library-workflow/files/ci.yml b/conventions/faithlife-dotnet-library-workflow/files/ci.yml index d0e8872..47afda6 100644 --- a/conventions/faithlife-dotnet-library-workflow/files/ci.yml +++ b/conventions/faithlife-dotnet-library-workflow/files/ci.yml @@ -81,7 +81,7 @@ jobs: uses: NuGet/login@v1 id: nuget-login with: - user: bgrainger + user: LogosPackages - name: Publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1fcb03603715063e575e48b60ebc209cad44ce52 Mon Sep 17 00:00:00 2001 From: Jason Tucker Date: Mon, 19 Oct 2026 17:14:39 -0400 Subject: [PATCH 2/4] Keep existing workflow convention tests unchanged Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../faithlife-dotnet-library-workflow/convention.Tests.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 b/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 index 0039e49..498500b 100644 --- a/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 +++ b/conventions/faithlife-dotnet-library-workflow/convention.Tests.ps1 @@ -67,7 +67,6 @@ Describe 'faithlife-dotnet-library-workflow convention' { # Assert the published workflow was created and reported. (Test-Path -LiteralPath $ciWorkflowPath) | Should -Be $true (Get-Content -LiteralPath $ciWorkflowPath -Raw) | Should -Be (Get-Content -LiteralPath $expectedWorkflowPaths['ci.yml'] -Raw) - (Get-Content -LiteralPath $ciWorkflowPath -Raw) | Should -Match '(?m)^ user: LogosPackages\r?$' (Test-Path -LiteralPath $copilotSetupWorkflowPath) | Should -Be $true (Get-Content -LiteralPath $copilotSetupWorkflowPath -Raw) | Should -Be (Get-Content -LiteralPath $expectedWorkflowPaths['copilot-setup-steps.yml'] -Raw) $status.Count | Should -Be 2 @@ -85,13 +84,12 @@ Describe 'faithlife-dotnet-library-workflow convention' { $testDirectory = New-TemporaryDirectory try { - # Arrange a repository with the previous publishing account and a placeholder setup workflow. + # Arrange a repository with a committed placeholder workflow. Initialize-TestRepository -Path $testDirectory $ciWorkflowPath = Join-Path $testDirectory '.github/workflows/ci.yml' $copilotSetupWorkflowPath = Join-Path $testDirectory '.github/workflows/copilot-setup-steps.yml' New-Item -ItemType Directory -Path (Split-Path -Parent $ciWorkflowPath) -Force | Out-Null - $previousCiWorkflow = (Get-Content -LiteralPath $expectedWorkflowPaths['ci.yml'] -Raw).Replace('user: LogosPackages', 'user: bgrainger') - [System.IO.File]::WriteAllText($ciWorkflowPath, $previousCiWorkflow, $utf8) + [System.IO.File]::WriteAllText($ciWorkflowPath, "name: Placeholder`n", $utf8) [System.IO.File]::WriteAllText($copilotSetupWorkflowPath, "name: Placeholder`n", $utf8) Push-Location $testDirectory From 191c4b72eea22d180d708ce5a736d23f2e9c5c07 Mon Sep 17 00:00:00 2001 From: Jason Tucker Date: Mon, 19 Oct 2026 17:15:06 -0400 Subject: [PATCH 3/4] Keep publishing change limited to workflow template Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- conventions/faithlife-dotnet-library-workflow/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/conventions/faithlife-dotnet-library-workflow/README.md b/conventions/faithlife-dotnet-library-workflow/README.md index a381292..3802f03 100644 --- a/conventions/faithlife-dotnet-library-workflow/README.md +++ b/conventions/faithlife-dotnet-library-workflow/README.md @@ -9,8 +9,6 @@ Installs the published Faithlife .NET library workflows at `.github/workflows/ci The convention copies the workflows from [files/ci.yml](./files/ci.yml) and [files/copilot-setup-steps.yml](./files/copilot-setup-steps.yml), and overwrites the target files when they differ. -NuGet publishing uses Trusted Publishing with the shared `LogosPackages` account rather than a personal account. Before adopting the workflow, ensure that `LogosPackages` has permission to publish the repository's packages and a matching NuGet Trusted Publishing policy for the repository and workflow. - ## Example ```yaml From 94be17b11eb2606772f51625e98631c43d0bd44e Mon Sep 17 00:00:00 2001 From: Jason Tucker Date: Mon, 19 Oct 2026 17:28:46 -0400 Subject: [PATCH 4/4] Disable NuGet audit output for package update convention Apply the same NuGetAudit directive as PR #79 to keep audit warnings out of the convention output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- conventions/update-nuget-packages/convention.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/conventions/update-nuget-packages/convention.cs b/conventions/update-nuget-packages/convention.cs index bbcf393..584fa68 100644 --- a/conventions/update-nuget-packages/convention.cs +++ b/conventions/update-nuget-packages/convention.cs @@ -1,5 +1,6 @@ #:package NuGet.Configuration@7.3.1 #:package NuGet.Protocol@7.3.1 +#:property NuGetAudit=false using NuGet.Common; using NuGet.Configuration;