Skip to content

Commit

Permalink
Merge pull request #13 from VisActor/release/1.8.8
Browse files Browse the repository at this point in the history
[Auto release] release 1.8.8
  • Loading branch information
zamhown authored Jan 23, 2024
2 parents 6a0d31a + ab7e138 commit e17842e
Show file tree
Hide file tree
Showing 219 changed files with 10,131 additions and 1,367 deletions.
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
vchart-theme:
- packages/vchart-theme/**

# Add 'vchart-theme-utils' label to any change within the 'vchart-theme-utils' package
vchart-theme-utils:
- packages/vchart-theme-utils/**

# Add 'vchart-semi-theme' label to any change within the 'vchart-semi-theme' package
vchart-semi-theme:
- packages/vchart-semi-theme/**

# Add 'vchart-arco-theme' label to any change within the 'vchart-arco-theme' package
vchart-arco-theme:
- packages/vchart-arco-theme/**

# Add 'test' label to any change to packages/*/__tests__/* files within the source dir
test:
- packages/*/__tests__/*
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/hotfix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: hotfix CI

on:
push:
branches:
- 'hotfix/[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: './common/config/rush/pnpm-lock.yaml'

# Install rush
- name: Install rush
run: node common/scripts/install-run-rush.js install --bypass-policy

- name: Parse semver version from branch name
id: semver_parser
uses: xile611/read-package-version-action@main
with:
path: packages/vchart-theme
semver_string: ${{ github.ref_name }}
semver_pattern: '^hotfix/(.*)$' # ^v?(.*)$ by default

- name: update nextBump of version policies
uses: xile611/set-next-bump-of-rush@main
with:
release_version: ${{ steps.semver_parser.outputs.full }}
write_next_bump: true

- name: Update version
run: node common/scripts/install-run-rush.js version --bump

- name: Build packages
run: node common/scripts/install-run-rush.js build --only tag:package

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: node common/scripts/install-run-rush.js publish --publish --include-all --tag hotfix

- name: Update shrinkwrap
run: node common/scripts/install-run-rush.js update

- name: Get npm version
id: package-version
uses: xile611/read-package-version-action@main
with:
path: packages/vchart-theme

- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'build: release version ${{ steps.package-version.outputs.current_version }}'
branch: ${{ github.ref_name }}

- name: Collect changelog of rush
uses: xile611/collect-rush-changlog@main
id: changelog
with:
version: ${{ steps.package-version.outputs.current_version }}

- name: Create Release for Tag
id: release_tag
uses: ncipollo/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ steps.package-version.outputs.current_version }}
commit: ${{ github.ref_name }}
prerelease: false
body: |
${{ steps.changelog.outputs.markdown }}
draft: true #
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
pull-requests: write

steps:
- uses: actions/labeler@master
- uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
10 changes: 2 additions & 8 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,8 @@ jobs:
semver_string: ${{ github.ref_name }}
semver_pattern: '^pre-release/(.*)$' # ^v?(.*)$ by default

- name: update nextBump of version policies
uses: xile611/set-next-bump-of-rush@main
with:
is_prerelease: true
write_next_bump: true

- name: Apply prereleaseName
run: node common/scripts/apply-prerelease-version.js ${{ steps.semver_parser.outputs.pre_release_name }} ${{ steps.semver_parser.outputs.main }}
run: node common/scripts/apply-release-version.js ${{ steps.semver_parser.outputs.pre_release_name }} ${{ steps.semver_parser.outputs.main }}

- name: Build packages
run: node common/scripts/install-run-rush.js build --only tag:package
Expand All @@ -71,6 +65,6 @@ jobs:
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'build: prelease version ${{ steps.package-version.outputs.current_version }}'
message: 'build: prerelease version ${{ steps.package-version.outputs.current_version }}'
branch: ${{ github.ref_name }}
author_name: ${{ github.actor }}
67 changes: 67 additions & 0 deletions .github/workflows/release-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release changelog

on:
release:
types: [published]

jobs:
update-changelog-after-publish-a-release:
name: GitHub Actions Test
runs-on: macOS-latest

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

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3
- run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: './common/config/rush/pnpm-lock.yaml'

# Install rush
- name: Install rush
run: node common/scripts/install-run-rush.js install --bypass-policy

- name: Create branch
run: |
git status
git fetch origin develop:develop
git checkout develop
git status
git checkout -b docs/generate-changelog-${{ github.event.release.tag_name }}
- name: generate changelog
id: generate-changelog
uses: xile611/collect-release-changelog@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: ./docs/site/assets/changelog
langs: 'en,zh'
tag_name: ${{github.event.release.tag_name}}
file_name: changelog.md

- name: Push branch
run: |
git add .
git commit -m "docs: generate changelog of release ${{ github.event.release.tag_name }}" -n
git push origin docs/generate-changelog-${{ github.event.release.tag_name }}
- name: Create Pull Request
uses: dustinirving/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: '[Auto changelog] changlog of ${{ github.event.release.tag_name }}'
base: develop
head: 'docs/generate-changelog-${{ github.event.release.tag_name }}'
labels: changelog
body: 'update changelog of ${{ github.event.release.tag_name }}'
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,25 @@ jobs:
release_version: ${{ steps.semver_parser.outputs.full }}
write_next_bump: true

- name: Update version
- name: Generate changelog by rush version
run: node common/scripts/install-run-rush.js version --bump

- name: Build and test packages
- name: Update version
run: node common/scripts/apply-release-version.js 'none' ${{ steps.semver_parser.outputs.main }}

- name: Build packages
run: node common/scripts/install-run-rush.js build --only tag:package
- run: node common/scripts/install-run-rush.js test --only tag:package

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: node common/scripts/install-run-rush.js publish --publish --include-all
run: node common/scripts/install-run-rush.js publish --publish --include-all --tag latest

- name: Update shrinkwrap
run: node common/scripts/install-run-rush.js update

- name: Parse semver version from branch name
- name: Get npm version
id: package-version
uses: xile611/read-package-version-action@main
with:
Expand All @@ -74,7 +76,7 @@ jobs:
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'build: prelease version ${{ steps.package-version.outputs.current_version }}'
message: 'build: release version ${{ steps.package-version.outputs.current_version }}'
branch: ${{ github.ref_name }}

- name: Collect changelog of rush
Expand All @@ -90,7 +92,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ steps.package-version.outputs.current_version }}
commit: main
commit: ${{ github.ref_name }}
prerelease: false
body: |
${{ steps.changelog.outputs.markdown }}
Expand All @@ -104,6 +106,6 @@ jobs:
base: main
head: ${{ github.ref_name }}
labels: release # default labels, the action will throw error if not specified
reviewers: xuefei1313 # default reviewers, the action will throw error if not specified
reviewers: zamhown # default reviewers, the action will throw error if not specified
body: |
${{ steps.changelog.outputs.markdown }}
60 changes: 60 additions & 0 deletions .github/workflows/sync-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Sync main to develop after release

on:
pull_request:
types:
- closed
branches:
- main

jobs:
if_merged:
if: github.event.pull_request.merged == true

runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

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

steps:
- uses: actions/checkout@v3
- run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: './common/config/rush/pnpm-lock.yaml'

# Install rush
- name: Install rush
run: node common/scripts/install-run-rush.js install --bypass-policy

- name: Get version
id: package-version
uses: xile611/read-package-version-action@main
with:
path: packages/vchart-theme

- name: Create a new branch
run: |
git checkout -b sync/main-${{ steps.package-version.outputs.current_version }}
git push origin sync/main-${{ steps.package-version.outputs.current_version }}
- name: Create Pull Request
uses: dustinirving/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: '[Auto Sync] Sync the code from branch main to branch develop after release ${{ steps.package-version.outputs.current_version }}'
base: develop
head: sync/main-${{ steps.package-version.outputs.current_version }}
reviewers: xile611
body: 'Sync the code from branch main to branch develop after release ${{ steps.package-version.outputs.current_version }}'
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Unit test CI

on:
pull_request:
branches: ['main', 'develop']
branches: ['main', 'develop', 'dev/**']

jobs:
build:
Expand Down
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ Extended themes for VChart
[![npm Download](https://img.shields.io/npm/dm/@visactor/vchart-theme.svg)](https://www.npmjs.com/package/@visactor/vchart-theme)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/visactor/vchart-theme/blob/main/LICENSE)

[@visactor/vchart-semi-theme](https://github.com/VisActor/vchart-semi-theme/tree/main/packages/vchart-semi-theme)
[@visactor/vchart-semi-theme](https://github.com/VisActor/vchart-theme/tree/main/packages/vchart-semi-theme)

[![npm Version](https://img.shields.io/npm/v/@visactor/vchart-semi-theme.svg)](https://www.npmjs.com/package/@visactor/vchart-semi-theme)
[![npm Download](https://img.shields.io/npm/dm/@visactor/vchart-semi-theme.svg)](https://www.npmjs.com/package/@visactor/vchart-semi-theme)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/visactor/vchart-theme/blob/main/LICENSE)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/visactor/vchart-semi-theme/blob/main/LICENSE)

[@visactor/vchart-arco-theme](https://github.com/VisActor/vchart-theme/tree/main/packages/vchart-arco-theme)

[![npm Version](https://img.shields.io/npm/v/@visactor/vchart-arco-theme.svg)](https://www.npmjs.com/package/@visactor/vchart-arco-theme)
[![npm Download](https://img.shields.io/npm/dm/@visactor/vchart-arco-theme.svg)](https://www.npmjs.com/package/@visactor/vchart-arco-theme)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/visactor/vchart-arco-theme/blob/main/LICENSE)

</div>

Expand All @@ -43,26 +49,13 @@ This repo is used to collect all extension themes for [VChart](https://github.co

This repository includes the following packages:

1. vchart-theme: contains all static extension themes
2. vchart-semi-theme: dynamic chart themes used in conjunction with [Semi Design](https://github.com/DouyinFE/semi-design).
1. [vchart-theme](https://github.com/VisActor/vchart-theme/tree/develop/packages/vchart-theme): contains all static extension themes
2. [vchart-semi-theme](https://github.com/VisActor/vchart-theme/tree/develop/packages/vchart-semi-theme): dynamic chart themes used in conjunction with [Semi Design](https://github.com/DouyinFE/semi-design).
3. [vchart-arco-theme](https://github.com/VisActor/vchart-theme/tree/develop/packages/vchart-arco-theme): dynamic chart themes used in conjunction with [ArcoDesign](https://github.com/arco-design).

# Usage

## Installation

[npm package](https://www.npmjs.com/package/@visactor/vchart-theme)

```bash
// npm
npm install @visactor/vchart-theme

// yarn
yarn add @visactor/vchart-theme
```

##

[More demos and detailed tutorials](https://visactor.io)
[More demos and detailed tutorials](https://www.visactor.io/vchart/guide/tutorial_docs/Theme/Theme_Extension)

# Related Links

Expand Down
Loading

0 comments on commit e17842e

Please sign in to comment.