From 79c1bdc0d45b70a4178280d754254daac020e54f Mon Sep 17 00:00:00 2001 From: Dennis Lysenko Date: Mon, 23 Sep 2024 21:07:28 -0400 Subject: [PATCH] Add secrets to publish workflows Included `DOTENV_KEY` and `NPM_TOKEN` secrets in `publish_nestjs.yaml` and `publish_client.yaml`. This ensures secure handling of tokens in GitHub Actions for publishing packages. --- .github/workflows/_publish.yaml | 3 +++ .github/workflows/publish_client.yaml | 4 +++- .github/workflows/publish_nestjs.yaml | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_publish.yaml b/.github/workflows/_publish.yaml index 8db8bf6..2ea09da 100644 --- a/.github/workflows/_publish.yaml +++ b/.github/workflows/_publish.yaml @@ -7,6 +7,9 @@ on: description: 'Package Target' required: true type: string + secrets: + NPM_TOKEN: + required: true jobs: publish: diff --git a/.github/workflows/publish_client.yaml b/.github/workflows/publish_client.yaml index 1015606..7ad3e6b 100644 --- a/.github/workflows/publish_client.yaml +++ b/.github/workflows/publish_client.yaml @@ -11,4 +11,6 @@ jobs: name: Client uses: ./.github/workflows/_publish.yaml with: - target: client \ No newline at end of file + target: client + secrets: + DOTENV_KEY: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish_nestjs.yaml b/.github/workflows/publish_nestjs.yaml index 08de6b0..6a0aa00 100644 --- a/.github/workflows/publish_nestjs.yaml +++ b/.github/workflows/publish_nestjs.yaml @@ -11,4 +11,6 @@ jobs: name: NestJS uses: ./.github/workflows/_publish.yaml with: - target: nestjs \ No newline at end of file + target: nestjs + secrets: + DOTENV_KEY: ${{ secrets.NPM_TOKEN }} \ No newline at end of file