chore: update next release ci (#6193)

* chore: update `next` release ci

* chore: update
This commit is contained in:
YANG QIA 2025-02-11 11:28:53 +08:00 committed by GitHub
parent 4dd4b56a4d
commit ce639261bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 45 additions and 36 deletions

View File

@ -13,6 +13,9 @@ on:
add_minor: add_minor:
description: 'add minor number' description: 'add minor number'
type: boolean type: boolean
version:
description: 'specific a version'
type: 'string'
jobs: jobs:
get-plugins: get-plugins:
@ -118,10 +121,11 @@ jobs:
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
echo "packages/pro-plugins" >> .git/info/exclude echo "packages/pro-plugins" >> .git/info/exclude
bash release.sh $IS_FEAT $ADD_MINOR bash release.sh $VERSION $IS_FEAT $ADD_MINOR
env: env:
PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.beta-plugins }} PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.beta-plugins }}
CUSTOM_PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.custom-plugins }} CUSTOM_PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.custom-plugins }}
VERSION: ${{ inputs.version && '--version ${{ inputs.version }}' || '' }}
IS_FEAT: ${{ inputs.is_feat && '--is-feat' || '' }} IS_FEAT: ${{ inputs.is_feat && '--is-feat' || '' }}
ADD_MINOR: ${{ inputs.add_minor && '--add-minor' || '' }} ADD_MINOR: ${{ inputs.add_minor && '--add-minor' || '' }}
- name: Push and merge into next - name: Push and merge into next

View File

@ -2,6 +2,10 @@ branch=$(git branch --show-current)
current_version=$(jq -r '.version' lerna.json) current_version=$(jq -r '.version' lerna.json)
IFS='.-' read -r major minor patch label pre <<< "$current_version" IFS='.-' read -r major minor patch label pre <<< "$current_version"
if [ "$1" == '--version' ];then
new_version="$2"
echo $new_version;
else
if [ "$branch" == "main" ]; then if [ "$branch" == "main" ]; then
# rc # rc
if [ "$1" == '--is-feat' ]; then if [ "$1" == '--is-feat' ]; then
@ -39,6 +43,7 @@ elif [ "$branch" == "develop" ]; then
else else
exit 1 exit 1
fi fi
fi
lerna version $new_version --preid alpha --force-publish=* --no-git-tag-version -y lerna version $new_version --preid alpha --force-publish=* --no-git-tag-version -y