remove grpc dep from composer #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish PHP SDK | |
| on: | |
| push: | |
| tags: | |
| - "php-sdk-v*" | |
| jobs: | |
| split-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Need full history for subtree split | |
| - name: Split subtree | |
| run: | | |
| git subtree split --prefix=packages/php -b php-sdk-split | |
| - name: Setup SSH for deploy key | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: | | |
| ${{ secrets.PHP_SDK_DEPLOY_KEY }} | |
| - name: Add GitHub to known_hosts | |
| run: | | |
| mkdir -p ~/.ssh | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| - name: Push to PHP SDK repository | |
| env: | |
| DEPLOY_KEY: ${{ secrets.PHP_SDK_DEPLOY_KEY }} | |
| run: | | |
| # Configure git | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| # Extract version from tag (php-sdk-v1.0.0 -> v1.0.0) | |
| VERSION=${GITHUB_REF#refs/tags/php-sdk-} | |
| # Push to separate repo | |
| git remote add php-sdk [email protected]:secmc/dragonfly-php-sdk.git | |
| git push php-sdk php-sdk-split:main --force | |
| git push php-sdk php-sdk-split:refs/tags/$VERSION | |
| echo "✅ Published version $VERSION to dragonfly-php-sdk" |