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:
|
||||
description: 'add minor number'
|
||||
type: boolean
|
||||
version:
|
||||
description: 'specific a version'
|
||||
type: 'string'
|
||||
|
||||
jobs:
|
||||
get-plugins:
|
||||
@ -118,10 +121,11 @@ jobs:
|
||||
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>'
|
||||
echo "packages/pro-plugins" >> .git/info/exclude
|
||||
bash release.sh $IS_FEAT $ADD_MINOR
|
||||
bash release.sh $VERSION $IS_FEAT $ADD_MINOR
|
||||
env:
|
||||
PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.beta-plugins }}
|
||||
CUSTOM_PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.custom-plugins }}
|
||||
VERSION: ${{ inputs.version && '--version ${{ inputs.version }}' || '' }}
|
||||
IS_FEAT: ${{ inputs.is_feat && '--is-feat' || '' }}
|
||||
ADD_MINOR: ${{ inputs.add_minor && '--add-minor' || '' }}
|
||||
- name: Push and merge into next
|
||||
|
13
release.sh
13
release.sh
@ -2,7 +2,11 @@ branch=$(git branch --show-current)
|
||||
current_version=$(jq -r '.version' lerna.json)
|
||||
IFS='.-' read -r major minor patch label pre <<< "$current_version"
|
||||
|
||||
if [ "$branch" == "main" ]; then
|
||||
if [ "$1" == '--version' ];then
|
||||
new_version="$2"
|
||||
echo $new_version;
|
||||
else
|
||||
if [ "$branch" == "main" ]; then
|
||||
# rc
|
||||
if [ "$1" == '--is-feat' ]; then
|
||||
new_version="$major.$minor.0"
|
||||
@ -12,7 +16,7 @@ if [ "$branch" == "main" ]; then
|
||||
new_version="$major.$minor.$new_patch"
|
||||
echo $new_version;
|
||||
fi
|
||||
elif [ "$branch" == "next" ]; then
|
||||
elif [ "$branch" == "next" ]; then
|
||||
# beta
|
||||
if [ "$1" == '--is-feat' ]; then
|
||||
if [ "$2" == '--add-minor' ]; then
|
||||
@ -25,7 +29,7 @@ elif [ "$branch" == "next" ]; then
|
||||
new_version="$major.$minor.$patch-beta.$new_pre"
|
||||
echo $new_version;
|
||||
fi
|
||||
elif [ "$branch" == "develop" ]; then
|
||||
elif [ "$branch" == "develop" ]; then
|
||||
# alpha
|
||||
if [ "$1" == '--is-feat' ]; then
|
||||
new_minor=$((minor + 1))
|
||||
@ -36,8 +40,9 @@ elif [ "$branch" == "develop" ]; then
|
||||
new_version="$major.$minor.$patch-alpha.$new_pre"
|
||||
echo $new_version;
|
||||
fi
|
||||
else
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
lerna version $new_version --preid alpha --force-publish=* --no-git-tag-version -y
|
||||
|
Loading…
x
Reference in New Issue
Block a user