Skip to content

Commit

Permalink
fix: 修复 CI 中安全问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Mar 31, 2022
1 parent 6f3ab7a commit 84f1927
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node ./scripts/ci-release.js "${{ github.event.head_commit.message }}"
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: node ./scripts/ci-release.js
- run: git status
- run: git log
9 changes: 7 additions & 2 deletions scripts/ci-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ function release(version, tag) {
.catch(e => console.log(e));
}

const { version, tag } = parseMsg(process.argv[2]);
const commitMsg = process.env.COMMIT_MESSAGE;

if (commitMsg) {
const { version, tag } = parseMsg(commitMsg);

release(version, tag);
}

release(version, tag);

0 comments on commit 84f1927

Please sign in to comment.