Skip to content

Commit

Permalink
build: dynamically add token and depend on test workflow (#2384)
Browse files Browse the repository at this point in the history
token and dependency
  • Loading branch information
huozhi authored Jan 26, 2023
1 parent ecabd48 commit 7e4fcc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Release

on:
workflows_run:
workflow: [Lint and Test]
types:
- completed
push:
tags:
- v*
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: TypeCheck, Lint, and Test
name: Lint and Test

on:
push:
Expand Down

0 comments on commit 7e4fcc4

Please sign in to comment.