@@ -274,19 +274,11 @@ jobs:
274
274
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
275
275
shell : pwsh
276
276
run : |
277
- # TODO: Update README.md on how to consume this package ; make public in GitHub settings at organization level
277
+ # TODO: Update README.md on how to consume packages ; make public in GitHub settings at organization level
278
278
dotnet nuget add source --username 'json-api-dotnet' --password "$env:GITHUB_TOKEN" --store-password-in-clear-text --name 'github' 'https://nuget.pkg.github.com/json-api-dotnet/index.json'
279
279
dotnet nuget push "$env:GITHUB_WORKSPACE/packages/*.nupkg" --api-key "$env:GITHUB_TOKEN" --source 'github'
280
- - name : Publish to NuGet
281
- # TODO: Test this
282
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
283
- env :
284
- NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
285
- shell : pwsh
286
- run : |
287
- dotnet nuget push "$env:GITHUB_WORKSPACE/packages/*.nupkg" --api-key "$env:NUGET_API_KEY" --source 'nuget.org'
288
280
- name : Publish documentation
289
- # TODO: Should also publish on release tag, but only from master
281
+ # TODO: Should also publish on release tag, but only from master - @($(git branch --remotes --contains v5.0.0 | select-object -first 1) -split '/')[1]
290
282
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
291
283
uses : peaceiris/actions-gh-pages@v3
292
284
with :
@@ -297,3 +289,11 @@ jobs:
297
289
# user_name: 'github-actions-bot'
298
290
# user_email: 'github-actions-bot@users.noreply.github.com'
299
291
# commit_message: 'Automated commit from cibuild'
292
+ - name : Publish to NuGet
293
+ # TODO: Test this
294
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
295
+ env :
296
+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
297
+ shell : pwsh
298
+ run : |
299
+ dotnet nuget push "$env:GITHUB_WORKSPACE/packages/*.nupkg" --api-key "$env:NUGET_API_KEY" --source 'nuget.org'
0 commit comments