chore: update release ci (#4632)

* chore: update release ci

* chore: test ci

* fix: ci

* fix: ci

* fix: update release.sh
This commit is contained in:
chenos 2024-06-12 11:37:23 +08:00 committed by GitHub
parent e6848858d4
commit b06c958070
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 4 deletions

View File

@ -6,6 +6,10 @@ concurrency:
on:
workflow_dispatch:
inputs:
is_feat:
description: 'is feat'
type: boolean
jobs:
push-commit:
runs-on: ubuntu-latest
@ -36,7 +40,9 @@ jobs:
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions Bot"
echo "packages/pro-plugins/" >> .git/info/exclude
bash release.sh
bash release.sh $IS_FEAT
env:
IS_FEAT: ${{ inputs.is_feat && '--is-feat' || '' }}
- name: push pro plugins
continue-on-error: true
uses: ad-m/github-push-action@master

View File

@ -1,5 +1,5 @@
{
"version": "1.0.1-alpha.3",
"version": "1.1.0-alpha",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": ["--ignore-engines"],

View File

@ -1,4 +1,18 @@
yarn version:alpha -y
current_version=$(jq -r '.version' lerna.json)
IFS='.-' read -r major minor patch label <<< "$current_version"
if [ "$1" == '--is-feat' ]; then
new_minor=$((minor + 1))
new_version="$major.$new_minor.0-$label"
echo $new_version;
else
new_patch=$((patch + 1))
new_version="$major.$minor.$new_patch-$label"
echo $new_version;
fi
lerna version $new_version --preid alpha --force-publish=* --no-git-tag-version -y
cd ./packages/pro-plugins
git add .
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' ../../lerna.json)"