Skip to content

Commit 8929ee1

Browse files
committed
1 parent b06450e commit 8929ee1

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/ci-manual-build-test-sign.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Manual Build, Test, Sign, Publish
1+
name: Release Build, Test, Sign, Publish
22
on:
33
workflow_dispatch:
44
inputs:
@@ -82,7 +82,7 @@ jobs:
8282
run: >
8383
Get-ChildItem -Path ${env:NUPKG_DIRECTORY} -Recurse -Force
8484
85-
- name: Upload unsigned nupkgs
85+
- name: Upload unsigned nupkgs to artifacts
8686
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8787
with:
8888
name: build-artifacts
@@ -129,7 +129,7 @@ jobs:
129129
run: >
130130
./sign/sign code azure-key-vault *.nupkg --base-directory ${env:NUPKG_DIRECTORY} --azure-key-vault-url "${{ secrets.AZURE_KEY_VAULT_URL }}" --azure-key-vault-certificate "${{ secrets.AZURE_KEY_VAULT_CERTIFICATE }}"
131131
132-
- name: Upload signed nupkgs
132+
- name: Upload signed nupkgs to artifacts
133133
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
134134
with:
135135
name: signed-artifacts
@@ -164,11 +164,17 @@ jobs:
164164
run: >
165165
Get-ChildItem -Path ${env:NUPKG_DIRECTORY} -Filter *.nupkg -Recurse -Force
166166
167+
- name: Authenticate to nuget
168+
uses: NuGet/login@d883674c922ba7e5cc0370927b10a33b67d54677 # v1.0.0
169+
id: nugetlogin
170+
with:
171+
user: ${{secrets.NUGET_USERNAME}}
172+
167173
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
168174
# This allows a retory of a failed workflow, already published packages will be skipped without error.
169-
- name: Publish NuGet package
175+
- name: Publish NuGet packages
170176
shell: pwsh
171177
run: >
172178
foreach($file in (Get-ChildItem "${env:NUPKG_DIRECTORY}" -Recurse -Filter *.nupkg)) {
173-
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
179+
dotnet nuget push $file --api-key "${{ steps.nugetlogin.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
174180
}

0 commit comments

Comments
 (0)