Skip to content

Commit 01843e3

Browse files
committed
Tweak.
1 parent 3d9e22b commit 01843e3

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/publish-packages-1.0.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,19 @@ jobs:
5757
run: dotnet build ./build/OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }} -p:RunningDotNetPack=true
5858

5959
- name: Sign DLLs with Cosign Keyless
60+
shell: pwsh
6061
run: |
61-
# Define an array of paths for signing.
62-
$dllPaths = @(
63-
'.\src\OpenTelemetry.Api\bin\Release\**\OpenTelemetry.Api.dll'
64-
'.\src\OpenTelemetry\bin\Release\**\OpenTelemetry.dll'
65-
'.\src\OpenTelemetry.Api.ProviderBuilderExtensions\bin\Release\**\OpenTelemetry.Api.ProviderBuilderExtensions.dll'
66-
)
67-
68-
foreach ($path in $dllPaths) {
69-
Write-Host "Processing path: $path"
70-
Get-ChildItem -Path $path -File | ForEach-Object {
71-
$fileFullPath = $_.FullName
72-
Write-Host "Signing $fileFullPath"
73-
cosign.exe sign-blob $fileFullPath --yes --output-signature $fileFullPath-keyless.sig --output-certificate $fileFullPath-keyless.pem
74-
}
62+
$projectFiles = Get-ChildItem -Path src/*/*.csproj -File
63+
64+
foreach ($projectFile in $projectFiles) {
65+
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($projectFile)
66+
67+
Get-ChildItem -Path src/$projectName/bin/Release/*/$projectName.dll -File | ForEach-Object {
68+
$fileFullPath = $_.FullName
69+
Write-Host "Signing $fileFullPath"
70+
71+
cosign.exe sign-blob $fileFullPath --yes --output-signature $fileFullPath-keyless.sig --output-certificate $fileFullPath-keyless.pem
72+
}
7573
}
7674
7775
- name: dotnet pack

0 commit comments

Comments
 (0)