Skip to content

Commit 57cdfc7

Browse files
authored
Add release spec for github action (#84)
1 parent bacb265 commit 57cdfc7

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/build-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ jobs:
192192
--azure-key-vault-client-secret "${{ secrets.SIGN_CLIENT_SECRET }}"
193193
--azure-key-vault-tenant-id ${{ secrets.SIGN_TENANT_ID }}
194194
--azure-key-vault-certificate "${{ secrets.SIGN_CERTIFICATE }}"
195-
--verbosity Information
195+
--verbosity Information
196196
197197
- name: Upload signed NuGet packages
198198
uses: actions/upload-artifact@v4

.github/workflows/build-template.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,29 @@ jobs:
146146
--api-key dummy
147147
--source MainLatest
148148
--skip-duplicate
149+
150+
release:
151+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
152+
needs: [ sign ]
153+
environment: nuget-release-gate
154+
runs-on: ubuntu-latest
155+
156+
steps:
157+
- name: Setup .NET
158+
uses: actions/setup-dotnet@v4
159+
with:
160+
dotnet-version: ${{ env.DOTNET_VERSION }}
161+
162+
- name: Download unsigned NuGet packages
163+
uses: actions/download-artifact@v4
164+
with:
165+
name: nuget-signed
166+
path: ${{ github.workspace }}/packages
167+
168+
- name: Push signed packages to NuGet.org
169+
run: >
170+
dotnet nuget push
171+
${{ github.workspace }}/packages/**/*.nupkg
172+
--source https://api.nuget.org/v3/index.json
173+
--api-key ${{ secrets.NUGET_PACKAGE_PUSH_TOKEN }}
174+
--skip-duplicate

0 commit comments

Comments
 (0)