From 7e4fcc4205ed4a9ed3e4c7acf6bc92a39b101478 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Thu, 26 Jan 2023 13:45:49 +0100 Subject: [PATCH] build: dynamically add token and depend on test workflow (#2384) token and dependency --- .github/workflows/release.yml | 8 ++++++-- .github/workflows/test.yml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c82366e69..ab9c0c2c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,10 @@ name: Release on: + workflows_run: + workflow: [Lint and Test] + types: + - completed push: tags: - v* @@ -16,7 +20,7 @@ jobs: uses: ./.github/workflows/install - name: Publish - run: npm publish --access public + - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + - run: npm publish --access public env: NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51b76d663..350c74961 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: TypeCheck, Lint, and Test +name: Lint and Test on: push: