Skip to content

Commit

Permalink
🐛 fix: Fix version for PR title and bump commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
honzabubenik committed Aug 28, 2024
1 parent f5a4bfa commit 149f24e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,15 @@ runs:
- run: echo -e "\n${{env.blue}}=== Bump package.json version ===\n"
shell: bash

- id: bump
- id: recommended-bump
run: |
BUMP_TYPE=$(npx conventional-recommended-bump -p @localazy/conventional-changelog-preset)
echo "bump-type=$BUMP_TYPE" >> "$GITHUB_OUTPUT"
PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "package-version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
echo "type=$BUMP_TYPE" >> "$GITHUB_OUTPUT"
shell: bash

- if: inputs.monorepo-bump == 'false'
run: |
npm version ${{ steps.bump.outputs.bump-type }} --git-tag-version false
npm version ${{ steps.recommended-bump.outputs.type }} --git-tag-version false
shell: bash

- if: inputs.monorepo-bump != 'false'
Expand All @@ -105,10 +103,16 @@ runs:
for item in "${BUMP_LIST[@]}"; do
cd $PROJECT_ROOT
cd "$item"
npm version ${{ steps.bump.outputs.bump-type }} --git-tag-version false
npm version ${{ steps.recommended-bump.outputs.type }} --git-tag-version false
done
shell: bash

- id: bump
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "package-version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
shell: bash

- run: echo -e "\n${{env.blue}}=== Generate changelog preview for PR ===\n"
shell: bash

Expand Down

0 comments on commit 149f24e

Please sign in to comment.