-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add github workflow release.yml (#1243)
* chore: add github workflow release.yml * chore: add snyk_token to yml * chore: remove snyk_token * chore: remove snyk_token * chore: remove snyk_token * chore: test puppeteer * chore: test puppeteer * chore: test puppeteer * chore: test master.yml * chore: set npm version * chore: set puppeteer version * chore: set puppeteer version --------- Co-authored-by: csg01123119 <csg01123119@alibaba-inc.com> Co-authored-by: YunZZY <1263206327@qq.com>
- Loading branch information
1 parent
13a2691
commit 2bdd51b
Showing
12 changed files
with
23,833 additions
and
14,904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- release | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# https://docs.github.com/zh/actions/using-jobs/assigning-permissions-to-jobs | ||
contents: write # 为 GITHUB_TOKEN 授予更新tag的权限 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # semantic-release和create-pull-request.js需要 | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # 只有semantic-release需要 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
- name: Install Dependencies | ||
run: npm install | ||
- name: Snyk Protect | ||
run: npm run snyk-protect | ||
- name: Release to npm | ||
run: npx semantic-release | ||
# - name: Publish to cdn | ||
# run: node publish.js # 因为发cdn 的ak权限比较大,有安全风险,故需要在本地发版到cdn | ||
# 为了创建pr,GIT_TOKEN需要public_repo权限(https://github.com/settings/tokens/new) | ||
- name: Create Pull Request | ||
run: node ./task/create-pull-request.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ jobs: | |
security: | ||
environment: ali_oss_AK | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"branches": "release", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": true | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "npm run build-dist" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"package.json", | ||
"lib/browser/version.js", | ||
"dist/*.js" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; | ||
module.exports = { extends: ['@commitlint/config-conventional'], ignores: [message => /\[skip ci\]/m.test(message)] }; |
Oops, something went wrong.