File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,22 +63,22 @@ jobs:
6363 - name : Prepare release version
6464 id : release
6565 run : |
66- if [ "${{ steps.npm.outputs.published }}" = "true" ]; then
66+ head_subject="$(git log -1 --pretty=%s)"
67+
68+ if [ "${{ steps.npm.outputs.published }}" = "true" ] && [[ "$head_subject" == chore\(release\):* ]]; then
6769 echo "should_publish=false" >> "$GITHUB_OUTPUT"
6870 echo "version=${{ steps.pkg.outputs.version }}" >> "$GITHUB_OUTPUT"
6971 exit 0
7072 fi
7173
72- head_subject="$(git log -1 --pretty=%s)"
73- if [[ "$head_subject" == chore\(release\):* ]]; then
74- echo "should_publish=false" >> "$GITHUB_OUTPUT"
75- echo "version=${{ steps.pkg.outputs.version }}" >> "$GITHUB_OUTPUT"
76- exit 0
74+ if [ "${{ steps.npm.outputs.published }}" = "true" ]; then
75+ npm version patch --no-git-tag-version
76+ pnpm install --lockfile-only
77+ echo "needs_commit=true" >> "$GITHUB_OUTPUT"
78+ else
79+ echo "needs_commit=false" >> "$GITHUB_OUTPUT"
7780 fi
7881
79- npm version patch --no-git-tag-version
80- pnpm install --lockfile-only
81- echo "needs_commit=true" >> "$GITHUB_OUTPUT"
8282 echo "should_publish=true" >> "$GITHUB_OUTPUT"
8383 echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
8484
You can’t perform that action at this time.
0 commit comments