From 443810ca5c223d33ed5860b0e114be34a7359290 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Wed, 17 Jul 2024 14:59:39 +0700 Subject: [PATCH] Add step to publish PR packages to GitHub registry --- .github/workflows/nuget-ci-cd.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/nuget-ci-cd.yml b/.github/workflows/nuget-ci-cd.yml index 24c831d..1a0e941 100644 --- a/.github/workflows/nuget-ci-cd.yml +++ b/.github/workflows/nuget-ci-cd.yml @@ -120,6 +120,13 @@ jobs: name: nuget-packages path: src/artifacts/package/release/*nupkg + - name: Publish package to GitHub + if: github.event_name == 'pull_request' || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads')) + shell: bash + run: | + echo Would run the following: + echo dotnet nuget push artifacts/*.nupkg -s https://nuget.pkg.github.com/sillsdev/index.json -k 'GITHUB_TOKEN goes here' --skip-duplicate + - name: Publish package to NuGet.org if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') shell: bash