From 01be7335324231f293aa5b3260aa0e26541595a1 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Sun, 30 Jul 2023 20:39:47 +0200 Subject: [PATCH] update workflow --- .github/workflows/ci.yml | 1 + .github/workflows/release.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a84402c2..b761df698 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,3 +88,4 @@ jobs: uses: './.github/workflows/release.yml' with: version: ${{ needs.create-release.outputs.VERSION }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df8a2cde0..9ad7c8fec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,12 @@ on: inputs: version: required: true + description: Version type: string + NPM_TOKEN: + description: NPM token to publish + type: string + required: true workflow_dispatch: inputs: @@ -80,7 +85,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Set Auth Token - run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} + run: npm config set //registry.npmjs.org/:_authToken ${{ inputs.NPM_TOKEN || secrets.NPM_TOKEN }} - name: Set new version run: pnpm --filter ${{ matrix.package }} version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version @@ -130,7 +135,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Set Auth Token - run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} + run: npm config set //registry.npmjs.org/:_authToken ${{ inputs.NPM_TOKEN || secrets.NPM_TOKEN }} - name: Set new version run: pnpm --filter lucide-static version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version