Skip to content

Publish NuGet packages to GitHub Packages #252

Publish NuGet packages to GitHub Packages

Publish NuGet packages to GitHub Packages #252

name: "Publish NuGet packages to GitHub Packages"
on:
workflow_run:
workflows: [".NET Publish (CI)"]
types:
- completed
jobs:
on-success:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
actions: read
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/download-artifact@v4
with:
name: nuget-packages
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed, packages will not be published.'