Skip to content

Publish Nuget Packages #541

Publish Nuget Packages

Publish Nuget Packages #541

Workflow file for this run

# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [PublishNugetPackagesJob (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_publish-nuget --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------
name: Publish Nuget Packages
on:
workflow_run:
workflows:
- 'ci'
types:
- 'completed'
permissions:
actions: read
checks: read
contents: read
deployments: read
id-token: none
issues: write
discussions: none
packages: none
pages: none
pull-requests: write
repository-projects: none
security-events: none
statuses: write
jobs:
publish_nuget:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: '${{ toJson(github) }}'
shell: pwsh
run: |
echo "$GITHUB_CONTEXT"
- name: 🚀 NuGet
uses: actions/download-artifact@v4
with:
name: 'nuget'
github-token: '${{ secrets.GITHUB_TOKEN }}'
run-id: '${{ github.event.workflow_run.id }}'
- name: nuget.org
env:
ApiKey: '${{ secrets.RSG_NUGET_API_KEY }}'
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
run: |
dotnet nuget push **/*.nupkg --skip-duplicate -s nuget.org --api-key $ENV:ApiKey
dotnet nuget push **/*.snupkg --skip-duplicate -s nuget.org --api-key $ENV:ApiKey