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
11 changes: 11 additions & 0 deletions .changelog/en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# v2.0.17

2026-02-26

**🐛 Bug Fixes**

- **@visactor/vchart**: fix: support functional alternateColor in axis grid configuration

**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.16...v2.0.17

[more detail about v2.0.17](https://github.com/VisActor/VChart/releases/tag/v2.0.17)
11 changes: 11 additions & 0 deletions .changelog/harmony.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# v2.0.17

2026-02-26

**🐛 Bug Fixes**

- **@visactor/vchart**: fix: support functional alternateColor in axis grid configuration

**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.16...v2.0.17

[more detail about v2.0.17](https://github.com/VisActor/VChart/releases/tag/v2.0.17)
11 changes: 11 additions & 0 deletions .changelog/zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# v2.0.17

2026-02-26

**🐛 问题修复**

- **@visactor/vchart**: fix: support functional alternateColor in axis grid configuration

**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.16...v2.0.17

[更多详情请查看 v2.0.17](https://github.com/VisActor/VChart/releases/tag/v2.0.17)
50 changes: 50 additions & 0 deletions .github/workflows/develop-synced-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Dispatch develop-synced after sync/main merged (Scheme A)

on:
pull_request:
types:
- closed
branches:
- develop

jobs:
dispatch_develop_synced:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'sync/main-')

runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Derive version from sync branch
id: version
run: |
set -euo pipefail
BRANCH="${{ github.event.pull_request.head.ref }}"
echo "Head branch: ${BRANCH}"
VERSION="${BRANCH#sync/main-}"
if [ -z "${VERSION}" ] || [ "${VERSION}" = "${BRANCH}" ]; then
echo "Failed to parse version from branch ${BRANCH}, skip dispatch."
echo "version=" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Parsed version: ${VERSION}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

- name: Send repository_dispatch develop-synced
if: steps.version.outputs.version != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
VERSION="${{ steps.version.outputs.version }}"
OWNER_REPO="${GITHUB_REPOSITORY}"

echo "Sending repository_dispatch develop-synced for version ${VERSION} to ${OWNER_REPO}"

curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${OWNER_REPO}/dispatches" \
-d "{\"event_type\":\"develop-synced\",\"client_payload\":{\"version\":\"${VERSION}\"}}"
184 changes: 184 additions & 0 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
name: Post release after develop synced

on:
repository_dispatch:
types: [develop-synced]

jobs:
post_release:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Read version from repository_dispatch payload
id: meta
env:
PAYLOAD_VERSION: ${{ github.event.client_payload.version }}
run: |
set -euo pipefail
if [ -z "${PAYLOAD_VERSION}" ]; then
echo "No version in client_payload, skip post-release."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Using version from payload: ${PAYLOAD_VERSION}"
echo "version=${PAYLOAD_VERSION}" >> "$GITHUB_OUTPUT"
echo "skip=false" >> "$GITHUB_OUTPUT"

- name: Checkout main
if: steps.meta.outputs.skip != 'true'
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
persist-credentials: false

- name: Configure git remote to use PAT
if: steps.meta.outputs.skip != 'true'
env:
GH_PAT: ${{ secrets.CREATE_TAG_RELEASE_TOKEN }}
run: |
set -euo pipefail
git remote set-url origin "https://x-access-token:${GH_PAT}@github.com/${GITHUB_REPOSITORY}.git"
git remote -v

- name: Fetch tags
if: steps.meta.outputs.skip != 'true'
run: |
set -euo pipefail
git fetch --tags --force

- name: Check existing tag and release
id: exist
if: steps.meta.outputs.skip != 'true'
env:
VERSION: ${{ steps.meta.outputs.version }}
GH_TOKEN: ${{ secrets.CREATE_TAG_RELEASE_TOKEN }}
run: |
set -euo pipefail
TAG="v${VERSION}"

if git rev-parse "refs/tags/${TAG}" >/dev/null 2>&1; then
echo "Tag ${TAG} already exists, skip post-release."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi

if gh release view "${TAG}" >/dev/null 2>&1; then
echo "Release ${TAG} already exists, skip post-release."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "skip=false" >> "$GITHUB_OUTPUT"

- name: Fetch develop changelog
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true'
run: |
set -euo pipefail
git fetch origin develop:refs/remotes/origin/develop --depth=1
git show origin/develop:docs/assets/changelog/en/release.md > release-develop.md

- name: Extract release body from develop changelog
id: body
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true'
env:
VERSION: ${{ steps.meta.outputs.version }}
run: |
set -euo pipefail
if [ ! -f "release-develop.md" ]; then
echo "develop changelog file not found, skip post-release."
echo "has_body=false" >> "$GITHUB_OUTPUT"
exit 0
fi

if node <<'NODE'
const fs = require('fs');

const version = process.env.VERSION;
const content = fs.readFileSync('release-develop.md', 'utf8');

function escapeRegExp(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}

const headerPattern = new RegExp('^#\\s*v?' + escapeRegExp(version) + '\\b', 'm');
const match = headerPattern.exec(content);

if (!match) {
console.log('No changelog block for version', version, 'found in develop.');
process.exit(1);
}

const startIndex = match.index;
const rest = content.slice(startIndex);

const nextHeaderPattern = /^#\s*v?\d+\.\d+\.\d+[^\n]*$/gm;
let nextIndex = rest.length;
let m;
if ((m = nextHeaderPattern.exec(rest)) !== null && m.index !== 0) {
nextIndex = m.index;
}

const block = rest.slice(0, nextIndex).trimEnd() + '\n';
fs.writeFileSync('release-body.md', block, 'utf8');
NODE
then
echo "has_body=true" >> "$GITHUB_OUTPUT"
else
echo "has_body=false" >> "$GITHUB_OUTPUT"
fi

- name: Verify gh identity
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true' && steps.body.outputs.has_body == 'true'
env:
GH_TOKEN: ${{ secrets.CREATE_TAG_RELEASE_TOKEN }}
run: |
set -euo pipefail
gh api user -q '.login'

- name: Diagnose PAT repository permission
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true' && steps.body.outputs.has_body == 'true'
env:
GH_TOKEN: ${{ secrets.CREATE_TAG_RELEASE_TOKEN }}
run: |
set -euo pipefail
LOGIN=$(gh api user -q '.login')
echo "PAT user: $LOGIN"
OWNER=${GITHUB_REPOSITORY%%/*}
REPO=${GITHUB_REPOSITORY#*/}
RESP=$(gh api "/repos/$OWNER/$REPO/collaborators/$LOGIN/permission" 2>&1 || true)
echo "$RESP"
if echo "$RESP" | grep -q '404'; then
echo "Not a collaborator (404), repository access may be restricted or PAT not authorized to org"
elif echo "$RESP" | grep -q '"permission":"write"'; then
echo "permission ok: write"
elif echo "$RESP" | grep -q '"permission":"admin"'; then
echo "permission ok: admin"
else
echo "permission insufficient: $RESP"
fi

- name: Create tag and GitHub Release
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true' && steps.body.outputs.has_body == 'true'
env:
VERSION: ${{ steps.meta.outputs.version }}
GH_TOKEN: ${{ secrets.CREATE_TAG_RELEASE_TOKEN }}
run: |
set -euo pipefail
TAG="v${VERSION}"

git fetch origin main:refs/remotes/origin/main --depth=1
MAIN_SHA="$(git rev-parse origin/main)"

echo "Creating tag ${TAG} at ${MAIN_SHA}"
git tag "${TAG}" "${MAIN_SHA}"
git push origin "${TAG}"

echo "Creating GitHub Release ${TAG}"
gh release create "${TAG}" \
--target "main" \
--title "${TAG}" \
--notes-file "release-body.md"
Loading