mirror of https://gitee.com/antv-l7/antv-l7
ci: 新增 release label action (#1097)
* chore: new scripts dir * ci: 新增 release label action * ci: 修改部署 token
This commit is contained in:
parent
ceca2404cf
commit
58d8acac38
|
@ -0,0 +1,24 @@
|
|||
# for .github/workflows/release-label.yml
|
||||
|
||||
changelog:
|
||||
exclude:
|
||||
labels:
|
||||
- ignore-for-release
|
||||
- chore
|
||||
categories:
|
||||
- title: 🎉 New Features
|
||||
labels:
|
||||
- feature
|
||||
- enhancement
|
||||
- title: 📖 Documentation Changes
|
||||
labels:
|
||||
- documentation
|
||||
- title: 🐛 Bug Fixes
|
||||
labels:
|
||||
- bugfix
|
||||
- title: 🛠 Breaking Changes
|
||||
labels:
|
||||
- breaking
|
||||
- title: Other Changes
|
||||
labels:
|
||||
- "*"
|
|
@ -0,0 +1,18 @@
|
|||
name: lint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: yarn
|
||||
- run: yarn lint
|
|
@ -17,17 +17,6 @@ jobs:
|
|||
# 注意替换为你的 Gitee 目标仓库地址
|
||||
destination-repo: 'git@gitee.com:antv-l7/antv-l7.git'
|
||||
|
||||
- name: 🔁 Sync to Gitee
|
||||
uses: wearerequired/git-mirror-action@master
|
||||
env:
|
||||
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
|
||||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
|
||||
with:
|
||||
# 注意替换为你的 GitHub 源仓库地址
|
||||
source-repo: 'git@github.com:antvis/L7.git'
|
||||
# 注意替换为你的 Gitee 目标仓库地址
|
||||
destination-repo: 'git@gitee.com:antv/L7.git'
|
||||
|
||||
- name: ✅ Build Gitee Pages
|
||||
uses: yanglbme/gitee-pages-action@master
|
||||
with:
|
||||
|
|
|
@ -5,13 +5,21 @@ on: pull_request
|
|||
jobs:
|
||||
preview:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: afc163/surge-preview@v1
|
||||
with:
|
||||
surge_token: ${{ secrets.SURGE_TOKEN }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
build: |
|
||||
yarn --frozen-lockfile
|
||||
yarn site:build
|
||||
dist: public
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- uses: afc163/surge-preview@v1
|
||||
with:
|
||||
surge_token: ${{ secrets.SURGE_TOKEN }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
dist: public
|
||||
build: |
|
||||
yarn --frozen-lockfile
|
||||
yarn site:build
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# Warning, do not check out untrusted code with
|
||||
# the pull_request_target event.
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened, edited ]
|
||||
name: conventional-release-labels
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: bcoe/conventional-release-labels@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
type_labels: '{"feat": "feature", "fix": "bugfix", "breaking": "breaking", "docs": "documentation", "chore": "chore"}'
|
|
@ -0,0 +1,40 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
- run: yarn
|
||||
- run: yarn lint
|
||||
|
||||
publish-site:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
- run: yarn
|
||||
- run: yarn site:build
|
||||
- run: |
|
||||
cd public
|
||||
git init
|
||||
git config --local user.name antv
|
||||
git config --local user.email antv@antfin.com
|
||||
git add .
|
||||
git commit -m "update by release action"
|
||||
- uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||
directory: public
|
||||
branch: gh-pages
|
||||
force: true
|
|
@ -84,8 +84,3 @@ stories/Test
|
|||
packages/draw/node_modules/@turf
|
||||
packages/district/src/data
|
||||
|
||||
# npm command lines
|
||||
publish.sh
|
||||
latest.sh
|
||||
beta.sh
|
||||
mini.sh
|
||||
|
|
16
lerna.json
16
lerna.json
|
@ -1,17 +1,11 @@
|
|||
{
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"packages": ["packages/*"],
|
||||
"command": {
|
||||
"publish": {
|
||||
"ignoreChanges": [
|
||||
"*.md"
|
||||
],
|
||||
"allowBranch": [
|
||||
"publish",
|
||||
"docs"
|
||||
],
|
||||
"message": "chore: publish"
|
||||
"ignoreChanges": ["*.md"],
|
||||
"allowBranch": ["publish", "docs"],
|
||||
"message": "chore: publish",
|
||||
"registry": "https://registry.npmjs.org"
|
||||
}
|
||||
},
|
||||
"version": "2.8.35",
|
||||
|
|
18
package.json
18
package.json
|
@ -145,13 +145,14 @@
|
|||
"site:clean": "gatsby clean",
|
||||
"site:deploy": "yarn run site:build && gh-pages -d public",
|
||||
"site:publish": "gh-pages -d public",
|
||||
"lint:fix": "prettier --write docs/api/**/*.md docs/api/*.md stories/**/**/*.tsx *.md",
|
||||
"lint:examples": "eslint examples --fix --ext .js",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"prebuild": "run-p tsc lint",
|
||||
"build": "yarn clean && lerna run build",
|
||||
"postbuild": "yarn build:declarations",
|
||||
"build:declarations": "lerna exec --stream --no-bail 'tsc --project ./tsconfig.build.json'",
|
||||
"fix": "run-p -c 'lint:ts-* --fix'",
|
||||
"lint:fix": "prettier --write docs/api/**/*.md docs/api/*.md stories/**/**/*.tsx *.md",
|
||||
"lint:examples": "eslint examples --fix --ext .js",
|
||||
"lint:css": "stylelint 'packages/**/*.js{,x}'",
|
||||
"lint:ts-prod": "tslint --fix --config tslint.prod.json 'packages/**/*.ts{,x}'",
|
||||
"lint:ts-test": "tslint --fix --config tslint.json 'packages/**/*.{spec,story}.ts{,x}'",
|
||||
|
@ -161,19 +162,18 @@
|
|||
"version": "lerna version --force-publish --conventional-commits --exact --no-changelog",
|
||||
"version:prerelease": "lerna version --force-publish --conventional-prerelease",
|
||||
"prerelease": "yarn build && yarn bundle",
|
||||
"release-beta": "yarn run prerelease && lerna publish --dist-tag beta from-package --registry https://registry.npmjs.org/ --force-publish && lerna run sync",
|
||||
"release": "lerna publish from-package --registry https://registry.npmjs.org/ --force-publish && lerna run sync",
|
||||
"release-beta": "yarn run prerelease && lerna publish --dist-tag beta from-package --force-publish && lerna run sync",
|
||||
"release": "lerna publish from-package --force-publish && lerna run sync",
|
||||
"release-cdn": "antv-bin upload -n @antv/l7",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"test": "cross-env BABEL_ENV=test jest",
|
||||
"test-live": "cross-env BABEL_ENV=test DEBUG_MODE=1 jest --watch",
|
||||
"coveralls": "jest --coverage && cat ./tests/coverage/lcov.info | coveralls",
|
||||
"tsc": "tsc",
|
||||
"watch": "yarn clean && lerna exec --parallel -- cross-env BABEL_ENV=cjs NODE_ENV=production babel --watch src --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
|
||||
"bundle": "cross-env BABEL_ENV=bundle NODE_ENV=production node_modules/.bin/rollup -c ./build/rollup.config.js --environment BUILD:production,MINIFY:true",
|
||||
"bundle-dev": "cross-env BABEL_ENV=bundle node_modules/.bin/rollup -c ./build/rollup.config.js --environment 'BUILD:production,MINIFY:false'",
|
||||
"bundle:watch": "cross-env BABEL_ENV=bundle node_modules/.bin/rollup -c ./build/rollup.config.js --watch",
|
||||
"glsl-minify": "node_modules/.bin/glsl-minifier -i ./build/example.frag -o ./build/example.min.frag",
|
||||
"bundle": "cross-env BABEL_ENV=bundle NODE_ENV=production yarn rollup -c build/rollup.config.js --environment BUILD:production,MINIFY:true",
|
||||
"bundle-dev": "cross-env BABEL_ENV=bundle yarn rollup -c build/rollup.config.js --environment BUILD:production,MINIFY:false",
|
||||
"bundle:watch": "cross-env BABEL_ENV=bundle yarn rollup -c build/rollup.config.js --watch",
|
||||
"glsl-minify": "yarn glsl-minifier -i build/example.frag -o build/example.min.frag",
|
||||
"clean": "lerna run clean",
|
||||
"sync": "lerna run sync"
|
||||
},
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"build:cjs": "BABEL_ENV=cjs babel src --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
|
||||
"build:esm": "BABEL_ENV=esm babel src --root-mode upward --out-dir es --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
|
||||
"watch": "BABEL_ENV=cjs babel src --watch --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
|
||||
"build:cdn": "node_modules/.bin/rollup -c",
|
||||
"build:cdn": "yarn rollup -c",
|
||||
"lint:ts": "run-p -c lint:ts-*",
|
||||
"test": "jest",
|
||||
"sync": "tnpm sync"
|
||||
|
|
|
@ -48,4 +48,4 @@ cd ./utils/
|
|||
npm publish
|
||||
cd ..
|
||||
|
||||
cd ..
|
||||
cd ..
|
Loading…
Reference in New Issue