Skip to content

Commit 9baf857

Browse files
fix: replace composer semver with direct PHP version bumping (#695)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Max Prilutskiy <maks.prilutskiy@gmail.com>
1 parent 7273b57 commit 9baf857

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/publish-php-sdk.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
php-version: '8.0'
5353
extensions: mbstring, intl
5454
coverage: none
55-
tools: composer:v2, composer-semver
55+
tools: composer:v2
5656

5757
- name: Install dependencies
5858
working-directory: ./php/sdk
@@ -67,8 +67,17 @@ jobs:
6767
- name: Bump patch version
6868
id: bump_version
6969
run: |
70-
# Use composer-semver for version bumping (always patch for main branch pushes)
71-
NEW_VERSION=$(composer semver ${{ steps.current_version.outputs.version }} --increment=patch)
70+
# Get current version
71+
CURRENT_VERSION=${{ steps.current_version.outputs.version }}
72+
73+
# Use PHP to increment patch version instead of composer semver
74+
NEW_VERSION=$(php -r '
75+
$version = "${{ steps.current_version.outputs.version }}";
76+
list($major, $minor, $patch) = explode(".", $version);
77+
$patch++;
78+
echo "$major.$minor.$patch";
79+
')
80+
7281
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
7382
7483
# Update version in composer.json

0 commit comments

Comments
 (0)