diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e1bcc8aa..288d9ecd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,22 +12,23 @@ on: env: CI: true +permissions: {} jobs: publish: permissions: contents: write # to create tags and refs actions: write # to cancel running workflow (andymckay/cancel-action) issues: write # to create comment + pull-requests: write # to create comment and so on name: publish runs-on: ubuntu-latest - steps: # Setup - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node ${{ matrix.node_version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 16 registry-url: 'https://registry.npmjs.org' @@ -48,10 +49,10 @@ jobs: # Get commit message - name: Get commit message run: | - COMMIT_MESSAGE=$(git log --format=%B -n 1) - echo "commitmsg=${COMMIT_MESSAGE}" >> $GITHUB_ENV + COMMIT_MESSAGE=$(git log --format=%s -n 1) + echo "COMMIT_MESSAGE=${COMMIT_MESSAGE}" >> $GITHUB_ENV - name: Show commit message - run : echo "$commitmsg" + run : echo "$COMMIT_MESSAGE" - name: Commit message compliance verification if: startsWith( env.COMMIT_MESSAGE , 'chore(release):' ) != true @@ -74,7 +75,7 @@ jobs: # Define ${CURRENT_VERSION} - name: Set Current Version - if: startsWith( env.commitmsg , 'chore(release):' ) + if: startsWith( env.COMMIT_MESSAGE , 'chore(release):' ) shell: bash -ex {0} run: | CURRENT_VERSION=$(node -p 'require("./packages/taro-ui/package.json").version') @@ -82,7 +83,7 @@ jobs: # Check git tag - name: Tag Check - if: startsWith( env.commitmsg , 'chore(release):' ) + if: startsWith( env.COMMIT_MESSAGE , 'chore(release):' ) id: tag_check shell: bash -ex {0} run: | @@ -112,25 +113,26 @@ jobs: restore-keys: | ${{ runner.os }}- - name: install - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v2.4.0 with: version: 8 run_install: | - recursive: true args: [--frozen-lockfile] - name: build - run: pnpm build + run: | + pnpm build # Git stash - name: Drop current changes - if: startsWith( env.commitmsg , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false' + if: startsWith( env.COMMIT_MESSAGE , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false' run: | git add . git stash # Create git tag - name: Create Git Tag - if: startsWith( env.commitmsg , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false' + if: startsWith( env.COMMIT_MESSAGE , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false' uses: azu/action-package-version-to-git-tag@v1 with: version: ${{ env.CURRENT_VERSION }} @@ -143,9 +145,9 @@ jobs: - name: Publish run: | if [ '${{ github.event_name }}' == 'pull_request' ] ; then - pnpm publish --registry=https://registry.npmjs.org/ --publish-branch=${{ github.ref }} -r + cd README.md packages/taro-ui & pnpm publish --registry=https://registry.npmjs.org/ --publish-branch=${{ github.ref }} -r elif [ '${{ github.event_name }}' == 'push' ] ; then - pnpm publish --registry=https://registry.npmjs.org/ --publish-branch=${{ github.ref_name }} -r ${{ env.PUBLISH_PARAMS }} + cd README.md packages/taro-ui & pnpm publish --registry=https://registry.npmjs.org/ --publish-branch=${{ github.ref_name }} -r ${{ env.PUBLISH_PARAMS }} fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -154,7 +156,7 @@ jobs: # Create relase when event is PR - name: Create Release id: create_release - if: startsWith( env.commitmsg , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false' && github.event.pull_request.merged == true + if: startsWith( env.COMMIT_MESSAGE , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false' && github.event.pull_request.merged == true uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index f088c4e1..db0ddd9a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "taro-ui", "description": "UI KIT for Taro", "author": "O2Team ", - "homepage": "https://taro-ui.aotu.io", + "homepage": "https://taro-ui.taro.zone", "repository": { "type": "git", "url": "git@github.com:nervjs/taro-ui.git" @@ -17,7 +17,11 @@ "build:demo": "pnpm --filter=taro-ui-demo build:h5", "build:doc": "pnpm run build:demo && pnpm --filter=taro-ui-docs build", "clean": " rimraf **/dist && rimraf **/node_modules", - "prepare": "husky install" + "prepare": "husky install", + "version": "run-s version:*", + "version:release": "pnpm --parallel -r --aggregate-output --filter=./packages/* exec npm version ${npm_package_version}", + "version:git": "git add . && git commit -m \"chore(release): publish ${npm_package_version}\"", + "version:changelog": "conventional-changelog -p angular" }, "devDependencies": { "@babel/core": "^7.22.11", diff --git a/packages/taro-ui-demo-rn/package.json b/packages/taro-ui-demo-rn/package.json index 0567f54a..3a23bbef 100644 --- a/packages/taro-ui-demo-rn/package.json +++ b/packages/taro-ui-demo-rn/package.json @@ -1,10 +1,10 @@ { "private": true, "name": "taro-ui-demo-rn", - "version": "3.1.0-beta.4", + "version": "3.2.0", "description": "Taro UI demo", "author": "O2Team ", - "homepage": "https://taro-ui.aotu.io", + "homepage": "https://taro-ui.taro.zone", "repository": { "type": "git", "url": "git@github.com:nervjs/taro-ui.git" diff --git a/packages/taro-ui-demo-rn/src/pages/form/input/index.tsx b/packages/taro-ui-demo-rn/src/pages/form/input/index.tsx index 976e2ab4..70983e1d 100644 --- a/packages/taro-ui-demo-rn/src/pages/form/input/index.tsx +++ b/packages/taro-ui-demo-rn/src/pages/form/input/index.tsx @@ -308,7 +308,7 @@ export default class Index extends React.Component { > {/* */} { height: Taro.pxTransform(60) }} source={{ - uri: 'https://taro-ui.aotu.io/h5/static/images/verification_code.png' + uri: 'https://taro-ui.taro.zone/h5/static/images/verification_code.png' }} resizeMode='cover' /> diff --git a/packages/taro-ui-demo/package.json b/packages/taro-ui-demo/package.json index 51ed284f..dd66ad0b 100644 --- a/packages/taro-ui-demo/package.json +++ b/packages/taro-ui-demo/package.json @@ -1,10 +1,10 @@ { "private": true, "name": "taro-ui-demo", - "version": "3.1.0-beta.4", + "version": "3.2.0", "description": "Taro UI demo", "author": "O2Team ", - "homepage": "https://taro-ui.aotu.io", + "homepage": "https://taro-ui.taro.zone", "repository": { "type": "git", "url": "git@github.com:nervjs/taro-ui.git" diff --git a/packages/taro-ui-docs/markdown/questions.md b/packages/taro-ui-docs/markdown/questions.md index 9cd19928..ea3df7a1 100644 --- a/packages/taro-ui-docs/markdown/questions.md +++ b/packages/taro-ui-docs/markdown/questions.md @@ -55,7 +55,7 @@ h5: { ## 如何自定义样式? -请查看 [「自定义主题」](https://taro-ui.aotu.io/#/docs/customizetheme) 章节 +请查看 [「自定义主题」](https://taro-ui.taro.zone/#/docs/customizetheme) 章节 ## 自定义样式为什么没有生效(H5 生效,微信小程序没生效)? diff --git a/packages/taro-ui-docs/package.json b/packages/taro-ui-docs/package.json index 75276945..3cd556fe 100644 --- a/packages/taro-ui-docs/package.json +++ b/packages/taro-ui-docs/package.json @@ -1,10 +1,10 @@ { "private": true, "name": "taro-ui-docs", - "version": "3.0.0-alpha.10", + "version": "3.2.0", "description": "Taro UI docs", "author": "O2Team ", - "homepage": "https://taro-ui.aotu.io", + "homepage": "https://taro-ui.taro.zone", "repository": { "type": "git", "url": "git@github.com:nervjs/taro-ui.git" diff --git a/packages/taro-ui/package.json b/packages/taro-ui/package.json index 1fc485d4..69f88034 100644 --- a/packages/taro-ui/package.json +++ b/packages/taro-ui/package.json @@ -1,6 +1,6 @@ { "name": "taro-ui", - "version": "3.1.1", + "version": "3.2.0", "description": "UI KIT for Taro", "module": "dist/index.esm.js", "main": "dist/index.js", @@ -23,7 +23,7 @@ "rn" ], "author": "O2Team ", - "homepage": "https://taro-ui.aotu.io", + "homepage": "https://taro-ui.taro.zone", "repository": { "type": "git", "url": "git@github.com:nervjs/taro-ui.git" diff --git a/packages/taro-ui/types/tab-bar.d.ts b/packages/taro-ui/types/tab-bar.d.ts index 342fc28f..19411d03 100644 --- a/packages/taro-ui/types/tab-bar.d.ts +++ b/packages/taro-ui/types/tab-bar.d.ts @@ -24,17 +24,17 @@ export interface TabItem { /** * icon className 前缀,用于第三方字体图标库, * 比如想使用'fa fa-clock' 的图标,则传入 iconPrefixClass='fa' iconType='clock', - * 参考[拓展图标库详细](https://taro-ui.aotu.io/#/docs/icon) + * 参考[拓展图标库详细](https://taro-ui.taro.zone/#/docs/icon) */ iconPrefixClass?: string /** * 未选中时展示的 icon 类型,可扩展第三方字体图标库, - * 参考[拓展图标库详细](https://taro-ui.aotu.io/#/docs/icon) + * 参考[拓展图标库详细](https://taro-ui.taro.zone/#/docs/icon) */ iconType?: string /** * 选中时展示的 icon 类型,可扩展第三方字体图标库, - * 参考[拓展图标库详细](https://taro-ui.aotu.io/#/docs/icon) + * 参考[拓展图标库详细](https://taro-ui.taro.zone/#/docs/icon) */ selectedIconType?: string /**