From 9e7b1d5638a4a9e2b776aa2c7f2eeb7affe5cec7 Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Tue, 24 Sep 2024 00:34:10 +0300 Subject: [PATCH] Reusable Workflow Secrets Declaration (#586) * Reusable Workflow Secrets Declaration * Update test-and-publish.yml --- .github/workflows/reusable-publish.yml | 9 ++++++++- .github/workflows/test-and-publish.yml | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-publish.yml b/.github/workflows/reusable-publish.yml index a3ec90fd4..ce15f76a0 100644 --- a/.github/workflows/reusable-publish.yml +++ b/.github/workflows/reusable-publish.yml @@ -15,6 +15,13 @@ on: required: true type: string description: 'The build configuration to use' + secrets: + NUGET_API_KEY: + required: true + NIGHTLY_NUGET_API_KEY: + required: true + NIGHTLY_NUGET_SOURCE: + required: true env: # Disable the .NET logo in the console output. @@ -50,4 +57,4 @@ jobs: - name: Push to NuGet Nightly if: ${{github.ref == 'refs/heads/development'}} run: dotnet nuget push "./artifacts/*.nupkg" -k ${{secrets.NIGHTLY_NUGET_API_KEY}} -s ${{secrets.NIGHTLY_NUGET_SOURCE}} --skip-duplicate - shell: pwsh \ No newline at end of file + shell: pwsh diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index 8ace11f76..7f23b7363 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -118,3 +118,7 @@ jobs: image: 'windows-latest' architecture: 'x64' build_configuration: 'Release' + secrets: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + NIGHTLY_NUGET_API_KEY: ${{ secrets.NIGHTLY_NUGET_API_KEY }} + NIGHTLY_NUGET_SOURCE: ${{ secrets.NIGHTLY_NUGET_SOURCE }}