Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/nightly-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ jobs:
registry-url: https://registry.npmjs.org/
- name: Setup and publish nightly
run: |
node build/nightly/prepare.js --next
npm i zrender@npm:zrender-nightly@next
Comment thread
plainheart marked this conversation as resolved.
npm ci
npm ls zrender
node build/nightly/post.js
npm run release
npm run test
npm run test:dts
node build/prepareNightly.js --next
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
5 changes: 4 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ jobs:
registry-url: https://registry.npmjs.org/
- name: Setup and publish nightly
run: |
node build/nightly/prepare.js
npm i zrender@npm:zrender-nightly
npm ci
npm ls zrender
node build/nightly/post.js
npm run release
npm run test
npm run test:dts
node build/prepareNightly.js
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
30 changes: 30 additions & 0 deletions build/nightly/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const fs = require('fs');

const root = __dirname + '/../../';
const echartsPkg = JSON.parse(fs.readFileSync(root + 'package.json'), 'utf-8');
const zrenderPkg = JSON.parse(fs.readFileSync(root + 'node_modules/zrender/package.json', 'utf-8'));

const echartsCorePath = root + 'src/core/echarts.ts';
const echartsCoreFile = fs.readFileSync(echartsCorePath, 'utf-8')
.replace(/export const version = '\S+'/, `export const version = '${echartsPkg.version}'`)
.replace(/(export const dependencies = {\s+zrender: ')\S+('\s+})/, `$1${zrenderPkg.version}$2`);
fs.writeFileSync(echartsCorePath, echartsCoreFile, 'utf-8');
7 changes: 3 additions & 4 deletions build/prepareNightly.js → build/nightly/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


const fs = require('fs');
const packageJsonPath = __dirname + '/../package.json';
const packageJsonPath = __dirname + '/../../package.json';
const nightlyPackageName = 'echarts-nightly';

const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
Expand Down Expand Up @@ -57,8 +57,7 @@ packageJson.version = updateVersion(packageJson.version);

fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');


const readmePath = __dirname + '/../README.md';
const readmePath = __dirname + '/../../README.md';
const readmeAttention = `<h3>
<p><em>⚠️ ATTENTION PLEASE</em></p>
<p><em>This is nightly build of Apache ECharts. Please DON't use it in your production environment.</em></p>
Expand All @@ -70,4 +69,4 @@ ${readmeAttention}

${readmeContent}
`, 'utf-8');
}
}