Skip to content

Commit 26bb98c

Browse files
committed
ci: mirror packages/php → auto-html-i18n-php on push + tag
1 parent 217847d commit 26bb98c

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/split-php.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Split PHP package to auto-html-i18n-php
2+
3+
# Mirrors packages/php/ to the auto-html-i18n-php repo with full git history.
4+
# That mirror is what Packagist watches — it's the single source of "the PHP package as a standalone repo".
5+
# - Push to main → mirror the latest main branch (so the default branch on the split repo stays current)
6+
# - Push tag v* → mirror with the tag attached, which is what triggers Packagist to create a new version
7+
on:
8+
push:
9+
branches: [main]
10+
tags: ['v*']
11+
workflow_dispatch:
12+
inputs:
13+
tag:
14+
description: 'Tag to mirror (leave blank to mirror main only)'
15+
required: false
16+
type: string
17+
18+
jobs:
19+
split-php:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0 # full history required for clean subtree split
25+
26+
- name: Split packages/php → auto-html-i18n-php
27+
uses: symplify/monorepo-split-github-action@v2.3.0
28+
with:
29+
package_directory: packages/php
30+
repository_organization: gabepri
31+
repository_name: auto-html-i18n-php
32+
branch: main
33+
tag: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || (github.ref_type == 'tag' && github.ref_name) || '' }}
34+
user_name: gabepri
35+
user_email: gabepriyev@incentfit.com
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
SSH_PRIVATE_KEY: ${{ secrets.PHP_SPLIT_DEPLOY_KEY }}

0 commit comments

Comments
 (0)