diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35a7b95ad..da7c6c1fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,10 +52,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - name: Release beta - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && !startsWith(github.head_ref, 'changeset-release/') run: sh scripts/release.sh env: - PUBLISH_VERSION: v9-beta + PUBLISH_VERSION: aui-v9-beta - name: Set git info if: github.event_name == 'workflow_dispatch' @@ -70,5 +70,5 @@ jobs: PUBLISH_VERSION: ${{ github.event.inputs.version }} - name: Sync Cnpm - if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && steps.changesets.outputs.published == 'true') + if: (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'changeset-release/')) || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && steps.changesets.outputs.published == 'true') run: npx cnpm sync @alauda/ui diff --git a/package.json b/package.json index 29cdb6592..bceb8611a 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "lint:tsc": "tsc -p . --noEmit", "prepare": "patch-package && simple-git-hooks && touch documentation.json && yarn-deduplicate --strategy fewer || exit 0", "prerelease": "yarn build", - "release": "changeset publish --tag v9", + "release": "changeset publish --tag aui-v9", "start": "yarn storybook", "storybook": "ng run storybook:storybook", "storybook:build": "ng run storybook:build-storybook", diff --git a/scripts/npm-tag.js b/scripts/npm-tag.js index 66f90d27a..3a5e49175 100644 --- a/scripts/npm-tag.js +++ b/scripts/npm-tag.js @@ -2,8 +2,8 @@ const { getProdVersion } = require('./utils'); const version = process.env.PUBLISH_VERSION; -if (version === 'v9-beta') { - process.stdout.write('v9-beta'); +if (version === 'aui-v9-beta') { + process.stdout.write('aui-v9-beta'); } else if (version.includes('-prod-')) { process.stdout.write(getProdVersion(version)); } else if (version === 'beta' || /-beta[._-]?\d*$/.test(version)) { diff --git a/scripts/publish-version.js b/scripts/publish-version.js index bc39c7684..dbf9e97b0 100644 --- a/scripts/publish-version.js +++ b/scripts/publish-version.js @@ -45,7 +45,7 @@ function getNextBetaVersion(stable, versions) { let version = process.env.PUBLISH_VERSION || 'patch'; -if (version === 'beta' || version === 'v9-beta') { +if (version === 'beta' || version === 'aui-v9-beta') { const versions = getNpmInfo('versions'); const stable = process.env.PUBLISH_BETA_BASE_VERSION || packageVersion;