From 8cd999cc304af76dcdf456752f1e38b2a5be9ff5 Mon Sep 17 00:00:00 2001 From: "haifeng.li" Date: Thu, 6 Jun 2024 16:56:10 -0700 Subject: [PATCH] fix: access token from a dif job --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d0ad1d..6e6872b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,8 @@ jobs: }') token=$(echo $response | jq -r '.token') echo "NPM_TOKEN=$token" >> $GITHUB_ENV + - name: Output variable + run: echo "::set-output name=npmtoken::$NPM_TOKEN" release: name: Release @@ -64,8 +66,11 @@ jobs: - name: Install dependencies run: npm clean-install - run: npm run build + - run: | + echo "local npm token: ${{needs.localNPMRegistry.outputs.npmtoken}}" + echo "NPM_TOKEN=${{needs.localNPMRegistry.outputs.npmtoken}}" >> $GITHUB_ENV - name: Release run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{env.NPM_TOKEN}} + NPM_TOKEN: ${{needs.localNPMRegistry.outputs.npmtoken}}