Skip to content

Commit

Permalink
Merge pull request #18836 from apache/master
Browse files Browse the repository at this point in the history
chore: prepare to release 5.4.3
  • Loading branch information
plainheart authored Jul 3, 2023
2 parents cfb3a8a + 7866509 commit 9fa6220
Show file tree
Hide file tree
Showing 61 changed files with 7,118 additions and 4,435 deletions.
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ body:
attributes:
label: Link to Minimal Reproduction
description: |
If the reproduction does not need a build setup, please provide a link to [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/), [JSBin](https://jsbin.com/) or [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM). If it requires a build setup, you can use [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or provide a GitHub repo.
If the reproduction does not need a build setup, please provide a link to [Official Editor](https://echarts.apache.org/examples/editor.html), [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/), [JSBin](https://jsbin.com/) or [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM). If it requires a build setup, you can use [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or provide a GitHub repo.
The reproduction should be **minimal** - i.e. it should contain only the bare minimum amount of code needed to show the bug.
Please do not just fill in a random link. The issue will be closed if no valid reproduction is provided. [Why?](https://antfu.me/posts/why-reproductions-are-required)
validations:
required: false
required: true

- type: textarea
attributes:
Expand Down
48 changes: 43 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ name: Node CI

on:
pull_request:
types: [opened, synchronize]
types: [opened, reopened, synchronize]

concurrency:
# Note that the `teardown-pr-preview` workflow needs the same group name
# to cancel the running `ci` workflows
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- name: Fetch commit count
Expand Down Expand Up @@ -58,7 +64,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -81,11 +87,43 @@ jobs:
if: steps.cache-dep.outputs.cache-hit != 'true'
run: npm ci

- name: Unit Test
run: npm run test

- name: Build release
run: npm run release

- name: Test generated DTS
run: npm run test:dts

- name: Unit Test
run: npm run test
- name: Pack npm tarball
if: ${{ github.repository_owner == 'apache' }}
id: pack-tarball
run: |
export PR_PREVIEW_DIR='echarts-pr-preview'
mkdir -p $PR_PREVIEW_DIR
npm pack -pack-destination $PR_PREVIEW_DIR
echo "PR_PREVIEW_DIR=$PR_PREVIEW_DIR" >> $GITHUB_ENV
- name: Save PR metadata and dist files
if: ${{ steps.pack-tarball.outcome == 'success' }}
id: save-pr-data
env:
PR_NUMBER: ${{ github.event.number }}
PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PR_PREVIEW_DIR: ${{ env.PR_PREVIEW_DIR }}
run: |
cd $PR_PREVIEW_DIR
echo $PR_NUMBER > ./pr_number
echo $PR_COMMIT_SHA > ./pr_commit_sha
find . -type f -regex ".*\.tgz" -exec tar xvzf {} \;
rm -f *.tgz
echo -e "Dist files: \n$(ls -l)"
- uses: actions/upload-artifact@v3
if: ${{ steps.save-pr-data.outcome == 'success' }}
with:
name: pr_preview
path: ${{ env.PR_PREVIEW_DIR }}
retention-days: 1
if-no-files-found: error
4 changes: 3 additions & 1 deletion .github/workflows/nightly-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -26,6 +26,8 @@ jobs:
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
node-version: ${{ matrix.node-version }}

- name: Setup and publish nightly
run: |
node build/nightly/prepare.js --next
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
node-version: ${{ matrix.node-version }}

- name: Setup and publish nightly
run: |
node build/nightly/prepare.js
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Deploy PR Preview

on:
workflow_run:
workflows: ['Node CI']
types: [completed]

jobs:
on-success:
if: ${{ github.repository_owner == 'apache' }}
runs-on: ubuntu-latest

steps:
- name: Determine if workflow build job is successful
id: check-build-success
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const jobsRes = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id
});
return jobsRes.data.jobs.some((job) => job.name.includes('build') && job.conclusion === 'success');
outputs:
SHOULD_DEPOLY: ${{ steps.check-build-success.outputs.result }}

deploy:
needs: [on-success]
if: ${{ needs.on-success.outputs.SHOULD_DEPOLY == 'true' }}
runs-on: ubuntu-latest

steps:
- name: Install action dependencies
run: |
mkdir .actions
cd .actions
git clone --depth=1 https://github.com/dawidd6/action-download-artifact.git
git clone --depth=1 https://github.com/actions-cool/maintain-one-comment.git
- name: Fetch PR dist files
uses: ./.actions/action-download-artifact
with:
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
name: pr_preview
if_no_artifact_found: fail

- name: Output PR metadata
id: pr-metadata
run: |
echo "NUMBER=$(cat pr_number)" >> $GITHUB_OUTPUT
echo "COMMIT_SHA=$(cat pr_commit_sha)" >> $GITHUB_OUTPUT
echo "COMMIT_SHA_SHORT=$(cat pr_commit_sha | cut -c 1-7)" >> $GITHUB_OUTPUT
- name: Deploy dist files
env:
PR_NUMBER: ${{ steps.pr-metadata.outputs.NUMBER }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
run: |
export SURGE_DOMAIN=https://echarts-pr-$PR_NUMBER.surge.sh
npx surge --project ./package --domain $SURGE_DOMAIN --token $SURGE_TOKEN
- name: Create comment for PR preview
uses: ./.actions/maintain-one-comment
env:
PR_NUMBER: ${{ steps.pr-metadata.outputs.NUMBER }}
COMMIT_SHA_SHORT: ${{ steps.pr-metadata.outputs.COMMIT_SHA_SHORT }}
with:
body: |
<!-- ECHARTS_PR_PREVIEW -->
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-${{ env.PR_NUMBER }}@${{ env.COMMIT_SHA_SHORT }}
body-include: '<!-- ECHARTS_PR_PREVIEW -->'
number: ${{ env.PR_NUMBER }}
6 changes: 3 additions & 3 deletions .github/workflows/source-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/teardown-pr-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Teardown PR Preview

on:
pull_request_target:
types: [closed]

jobs:
teardown-pr-preview:
if: ${{ github.repository_owner == 'apache' && github.event.action == 'closed' && github.event.pull_request.merged != true }}
concurrency:
# to cancel running `ci` workflows in current PR
group: 'Node CI-${{ github.event.number }}'
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Install action dependencies
run: git clone --depth=1 https://github.com/actions-cool/maintain-one-comment.git

- name: Delete PR preview comment
uses: ./maintain-one-comment
with:
body-include: '<!-- ECHARTS_PR_PREVIEW -->'
delete: true
number: ${{ github.event.number }}

- name: Teardown closed PR preview
continue-on-error: true
run: |
export SURGE_DOMAIN='https://echarts-pr-${{ github.event.number }}.surge.sh'
npx surge teardown $SURGE_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run checktype
5 changes: 0 additions & 5 deletions .huskyrc

This file was deleted.

49 changes: 49 additions & 0 deletions KEYS
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,52 @@ oEg8NMD8Wao5YN22JG30anrmYadZaghIwBz6rEuHmbf5MwcKoK349LptfHV4fhuq
5B5E6LlMNPTCWmPzYtTm5qZK
=bbcU
-----END PGP PUBLIC KEY BLOCK-----
pub ed25519 2022-12-01 [SC] [expires: 2024-11-30]
016736F5612A13D1FD04AA45CC593BC1F4F4EB7A
uid [ultimate] susiwen <susiwen8@gmail.com>
sig 3 CC593BC1F4F4EB7A 2022-12-01 susiwen <susiwen8@gmail.com>
sub cv25519 2022-12-01 [E] [expires: 2024-11-30]
sig CC593BC1F4F4EB7A 2022-12-01 susiwen <susiwen8@gmail.com>

-----BEGIN PGP PUBLIC KEY BLOCK-----

mDMEY4jDBhYJKwYBBAHaRw8BAQdAlpaQNA7ARfkPVj6EoYARkkGPdLgOmulCwScl
xGk3+8m0HHN1c2l3ZW4gPHN1c2l3ZW44QGdtYWlsLmNvbT6ImQQTFgoAQRYhBAFn
NvVhKhPR/QSqRcxZO8H09Ot6BQJjiMMGAhsDBQkDwmcABQsJCAcCAiICBhUKCQgL
AgQWAgMBAh4HAheAAAoJEMxZO8H09Ot6gcoBANBsCrZOwZtWCCQB2A6cy0or7q4c
GdyMJbP7zT5tdAAuAQDI7dy5/KE5tklZmEHJZevQLWezs6yKi+31QxcNFh6FA7g4
BGOIwwYSCisGAQQBl1UBBQEBB0A4z0jb/PpPRt/zILSBzl8XidMvvQAksexms4P4
D74EcQMBCAeIfgQYFgoAJhYhBAFnNvVhKhPR/QSqRcxZO8H09Ot6BQJjiMMGAhsM
BQkDwmcAAAoJEMxZO8H09Ot6hEABALEBaZSNzmx17PbubyiyvtaEISuzsv23RYwh
4NRHP4BkAP475WSjwMns2hSairvPXULqAcqQnjytov7CU1hbMLvgDpgzBGOMr5EW
CSsGAQQB2kcPAQEHQF85ZZTr9NstXxkToCrkVYwNuahidgRyv6S3zo2xTc6ZtC9z
dXNpd2VuIChDT0RFIFNJR05JTkcgS0VZKSA8c3VzaXdlbjhAZ21haWwuY29tPoiT
BBMWCgA7FiEEhBIjSy5LUgkGNSGQJZ0/SMJTSzwFAmOMr5ECGwMFCwkIBwICIgIG
FQoJCAsCBBYCAwECHgcCF4AACgkQJZ0/SMJTSzyNaAD+P35MI4r5nUDDg97QKYNY
m99MtUxTmcK/KGsrxYEZEDEA/jECGFvy/5WAhIRUTl4ExVsY3eBL/K2DaoTseW4a
eVEPuDgEY4yvkRIKKwYBBAGXVQEFAQEHQKNPmeMoqbHBVs5xn0c+Tz/bPW0rDDbw
Gt1pqdBMdmUvAwEIB4h4BBgWCgAgFiEEhBIjSy5LUgkGNSGQJZ0/SMJTSzwFAmOM
r5ECGwwACgkQJZ0/SMJTSzxTzQD+MTFHjt7z78fdTqbbRA6isxPV84cAFQsX4cRx
PRobcbkBAIwAkq+ddEycxZTdzaELpE08h/BLcScqbOl/ME1PTZ0H
=3Tm4
-----END PGP PUBLIC KEY BLOCK-----
pub ed25519 2023-03-15 [SC] [有效至:2025-03-14]
9C8B166777DB15AD1CC0FFBF715559B9217D4E5A
uid [ 绝对 ] zakwu <123537200@qq.com>
sig 3 715559B9217D4E5A 2023-03-15 zakwu <123537200@qq.com>
sub cv25519 2023-03-15 [E] [有效至:2025-03-14]
sig 715559B9217D4E5A 2023-03-15 zakwu <123537200@qq.com>

-----BEGIN PGP PUBLIC KEY BLOCK-----

mDMEZBE+JRYJKwYBBAHaRw8BAQdA4US4FlrxvH2Ckj5NzIkeL5nd4NyDBrlpyERo
KvlXn/C0GHpha3d1IDwxMjM1MzcyMDBAcXEuY29tPoiZBBMWCgBBFiEEnIsWZ3fb
Fa0cwP+/cVVZuSF9TloFAmQRPiUCGwMFCQPCZwAFCwkIBwICIgIGFQoJCAsCBBYC
AwECHgcCF4AACgkQcVVZuSF9TloeGAD/RjarHn34jh1NtJGi6Z8wv/XWESxyNH6g
orBPlQ+yluEBAIinhY8j/XczJQUcj9cqpMB4m8R+/jEadbaBe9pQ3uAHuDgEZBE+
JRIKKwYBBAGXVQEFAQEHQPa8rnpAhbsWw0VsCbYo1J+VeZXT/piqPpdducN3Wyh2
AwEIB4h+BBgWCgAmFiEEnIsWZ3fbFa0cwP+/cVVZuSF9TloFAmQRPiUCGwwFCQPC
ZwAACgkQcVVZuSF9Tlrc4QD/ZDd7OjcT9ShdARjcGoQ0jt6rEqL6n10V6caG+77a
89wA/R+29UlbOXNAxcQHxph8WXUZhACDhKyNETgRsgHysZQJ
=/6bg
-----END PGP PUBLIC KEY BLOCK-----
4 changes: 2 additions & 2 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ function validateIO(input, output) {
*/
async function build(configs) {
console.log(chalk.yellow(`
NOTICE: If you are using 'npm run build'. Run 'npm run prepublish' before build !!!
NOTICE: If you are using 'npm run build'. Run 'npm run prepare' before build !!!
`));

console.log(chalk.yellow(`
NOTICE: If you are using syslink on zrender. Run 'npm run prepublish' in zrender first !!
NOTICE: If you are using syslink on zrender. Run 'npm run prepare' in zrender first !!
`));

for (let singleConfig of configs) {
Expand Down
Loading

0 comments on commit 9fa6220

Please sign in to comment.