mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
chore: update next
release ci (#6193)
* chore: update `next` release ci * chore: update
This commit is contained in:
parent
4dd4b56a4d
commit
ce639261bf
6
.github/workflows/manual-release-next.yml
vendored
6
.github/workflows/manual-release-next.yml
vendored
@ -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
|
||||||
|
75
release.sh
75
release.sh
@ -2,42 +2,47 @@ 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 [ "$branch" == "main" ]; then
|
if [ "$1" == '--version' ];then
|
||||||
# rc
|
new_version="$2"
|
||||||
if [ "$1" == '--is-feat' ]; then
|
echo $new_version;
|
||||||
new_version="$major.$minor.0"
|
|
||||||
echo $new_version;
|
|
||||||
else
|
|
||||||
new_patch=$((patch + 1))
|
|
||||||
new_version="$major.$minor.$new_patch"
|
|
||||||
echo $new_version;
|
|
||||||
fi
|
|
||||||
elif [ "$branch" == "next" ]; then
|
|
||||||
# beta
|
|
||||||
if [ "$1" == '--is-feat' ]; then
|
|
||||||
if [ "$2" == '--add-minor' ]; then
|
|
||||||
minor=$((minor + 1))
|
|
||||||
fi
|
|
||||||
new_version="$major.$minor.0-beta.1"
|
|
||||||
echo $new_version;
|
|
||||||
else
|
|
||||||
new_pre=$((pre + 1))
|
|
||||||
new_version="$major.$minor.$patch-beta.$new_pre"
|
|
||||||
echo $new_version;
|
|
||||||
fi
|
|
||||||
elif [ "$branch" == "develop" ]; then
|
|
||||||
# alpha
|
|
||||||
if [ "$1" == '--is-feat' ]; then
|
|
||||||
new_minor=$((minor + 1))
|
|
||||||
new_version="$major.$new_minor.0-alpha.1"
|
|
||||||
echo $new_version;
|
|
||||||
else
|
|
||||||
new_pre=$((pre + 1))
|
|
||||||
new_version="$major.$minor.$patch-alpha.$new_pre"
|
|
||||||
echo $new_version;
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
exit 1
|
if [ "$branch" == "main" ]; then
|
||||||
|
# rc
|
||||||
|
if [ "$1" == '--is-feat' ]; then
|
||||||
|
new_version="$major.$minor.0"
|
||||||
|
echo $new_version;
|
||||||
|
else
|
||||||
|
new_patch=$((patch + 1))
|
||||||
|
new_version="$major.$minor.$new_patch"
|
||||||
|
echo $new_version;
|
||||||
|
fi
|
||||||
|
elif [ "$branch" == "next" ]; then
|
||||||
|
# beta
|
||||||
|
if [ "$1" == '--is-feat' ]; then
|
||||||
|
if [ "$2" == '--add-minor' ]; then
|
||||||
|
minor=$((minor + 1))
|
||||||
|
fi
|
||||||
|
new_version="$major.$minor.0-beta.1"
|
||||||
|
echo $new_version;
|
||||||
|
else
|
||||||
|
new_pre=$((pre + 1))
|
||||||
|
new_version="$major.$minor.$patch-beta.$new_pre"
|
||||||
|
echo $new_version;
|
||||||
|
fi
|
||||||
|
elif [ "$branch" == "develop" ]; then
|
||||||
|
# alpha
|
||||||
|
if [ "$1" == '--is-feat' ]; then
|
||||||
|
new_minor=$((minor + 1))
|
||||||
|
new_version="$major.$new_minor.0-alpha.1"
|
||||||
|
echo $new_version;
|
||||||
|
else
|
||||||
|
new_pre=$((pre + 1))
|
||||||
|
new_version="$major.$minor.$patch-alpha.$new_pre"
|
||||||
|
echo $new_version;
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user