Skip to content

Commit

Permalink
chore: update release ci (nocobase#4632)
Browse files Browse the repository at this point in the history
* chore: update release ci

* chore: test ci

* fix: ci

* fix: ci

* fix: update release.sh
  • Loading branch information
chenos authored Jun 12, 2024
1 parent e684885 commit b06c958
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ concurrency:

on:
workflow_dispatch:
inputs:
is_feat:
description: 'is feat'
type: boolean
jobs:
push-commit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,7 +40,9 @@ jobs:
git config --global user.email "[email protected]"
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
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.1-alpha.3",
"version": "1.1.0-alpha",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": ["--ignore-engines"],
Expand Down
18 changes: 16 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
@@ -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)"
Expand All @@ -11,4 +25,4 @@ git tag v$(jq -r '.version' lerna.json)
yarn changelog --breaking-pattern "BREAKING CHANGE:"
git add .
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)

0 comments on commit b06c958

Please sign in to comment.