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: on:
workflow_dispatch: workflow_dispatch:
inputs:
is_feat:
description: 'is feat'
type: boolean
jobs: jobs:
push-commit: push-commit:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -36,7 +40,9 @@ jobs:
git config --global user.email "actions@github.com" git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions Bot" git config --global user.name "GitHub Actions Bot"
echo "packages/pro-plugins/" >> .git/info/exclude 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 - name: push pro plugins
continue-on-error: true continue-on-error: true
uses: ad-m/github-push-action@master 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", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"npmClientArgs": ["--ignore-engines"], "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 cd ./packages/pro-plugins
git add . git add .
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' ../../lerna.json)" git commit -m "chore(versions): 😊 publish v$(jq -r '.version' ../../lerna.json)"
@ -11,4 +25,4 @@ git tag v$(jq -r '.version' lerna.json)
yarn changelog --breaking-pattern "BREAKING CHANGE:" yarn changelog --breaking-pattern "BREAKING CHANGE:"
git add . git add .
git commit -m "chore: update changelog" git commit -m "chore: update changelog"
#git push --atomic origin main v$(jq -r '.version' lerna.json) # git push --atomic origin main v$(jq -r '.version' lerna.json)