From 453cd22efb2184ef3d21fb183695f12262626e97 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo <1102197+priyadi@users.noreply.github.com> Date: Sun, 31 Mar 2024 03:32:16 +0700 Subject: [PATCH] monorepo split settings --- .github/workflows/split.yml | 86 +++++++++++++++++++ packages/rekapager-bundle/composer.json | 2 +- packages/rekapager-contracts/composer.json | 2 +- packages/rekapager-core/composer.json | 2 +- .../composer.json | 2 +- .../composer.json | 2 +- .../rekapager-keyset-pagination/composer.json | 2 +- .../rekapager-offset-pagination/composer.json | 2 +- 8 files changed, 93 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/split.yml diff --git a/.github/workflows/split.yml b/.github/workflows/split.yml new file mode 100644 index 0000000..7fef1d4 --- /dev/null +++ b/.github/workflows/split.yml @@ -0,0 +1,86 @@ +name: 'Packages Split' + +on: + workflow_dispatch: null + push: + branches: + - main + tags: + - '*' + +env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + +jobs: + packages_split: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + # define package to repository map + package: + - + local_path: 'rekapager-bundle' + split_repository: 'rekapager-bundle' + - + local_path: 'rekapager-contracts' + split_repository: 'rekapager-contracts' + - + local_path: 'rekapager-core' + split_repository: 'rekapager-core' + - + local_path: 'rekapager-doctrine-collections-adapter' + split_repository: 'rekapager-doctrine-collections-adapter' + - + local_path: 'rekapager-doctrine-orm-adapter' + split_repository: 'rekapager-doctrine-orm-adapter' + - + local_path: 'rekapager-keyset-pagination' + split_repository: 'rekapager-keyset-pagination' + - + local_path: 'rekapager-offset-pagination' + split_repository: 'rekapager-offset-pagination' + + steps: + - uses: actions/checkout@v2 + + # no tag + - + if: "!startsWith(github.ref, 'refs/tags/')" + uses: "danharrin/monorepo-split-github-action@v2.3.0" + with: + # ↓ split "packages/easy-coding-standard" directory + package_directory: 'packages/${{ matrix.package.local_path }}' + + # ↓ into https://github.com/symplify/easy-coding-standard repository + repository_organization: 'rekalogika' + repository_name: '${{ matrix.package.split_repository }}' + + # [optional, with "github.com" as default] + repository_host: github.com + + # ↓ the user signed under the split commit + user_name: "Priyadi Iman Nurcahyo" + user_email: "1102197+priyadi@users.noreply.github.com" + + # with tag + - + if: "startsWith(github.ref, 'refs/tags/')" + uses: "danharrin/monorepo-split-github-action@v2.3.0" + with: + tag: ${GITHUB_REF#refs/tags/} + + # ↓ split "packages/easy-coding-standard" directory + package_directory: 'packages/${{ matrix.package.local_path }}' + + # ↓ into https://github.com/symplify/easy-coding-standard repository + repository_organization: 'rekalogika' + repository_name: '${{ matrix.package.split_repository }}' + + # [optional, with "github.com" as default] + repository_host: github.com + + # ↓ the user signed under the split commit + user_name: "Priyadi Iman Nurcahyo" + user_email: "1102197+priyadi@users.noreply.github.com" diff --git a/packages/rekapager-bundle/composer.json b/packages/rekapager-bundle/composer.json index 0ab5f9e..348ddfd 100644 --- a/packages/rekapager-bundle/composer.json +++ b/packages/rekapager-bundle/composer.json @@ -1,6 +1,6 @@ { "name": "rekalogika/rekapager-bundle", - "description": "", + "description": "Symfony bundle for the Rekapager library", "homepage": "https://rekalogika.dev/rekapager", "keywords": [], "license": "MIT", diff --git a/packages/rekapager-contracts/composer.json b/packages/rekapager-contracts/composer.json index dcc78d1..2a4da0d 100644 --- a/packages/rekapager-contracts/composer.json +++ b/packages/rekapager-contracts/composer.json @@ -1,6 +1,6 @@ { "name": "rekalogika/rekapager-contracts", - "description": "", + "description": "Interfaces and nominal classes for Rekapager pagination library", "homepage": "https://rekalogika.dev/rekapager", "keywords": [], "license": "MIT", diff --git a/packages/rekapager-core/composer.json b/packages/rekapager-core/composer.json index 2886e3d..5b45e5a 100644 --- a/packages/rekapager-core/composer.json +++ b/packages/rekapager-core/composer.json @@ -1,6 +1,6 @@ { "name": "rekalogika/rekapager-core", - "description": "", + "description": "Core functionality of Rekapager pagination library", "homepage": "https://rekalogika.dev/rekapager", "keywords": [], "license": "MIT", diff --git a/packages/rekapager-doctrine-collections-adapter/composer.json b/packages/rekapager-doctrine-collections-adapter/composer.json index 7df1fca..354ae93 100644 --- a/packages/rekapager-doctrine-collections-adapter/composer.json +++ b/packages/rekapager-doctrine-collections-adapter/composer.json @@ -1,6 +1,6 @@ { "name": "rekalogika/rekapager-doctrine-collections-adapter", - "description": "", + "description": "Doctrine Collections adapter for Rekapager pagination library", "homepage": "https://rekalogika.dev/rekapager", "keywords": [], "license": "MIT", diff --git a/packages/rekapager-doctrine-orm-adapter/composer.json b/packages/rekapager-doctrine-orm-adapter/composer.json index 7ee7391..7df397f 100644 --- a/packages/rekapager-doctrine-orm-adapter/composer.json +++ b/packages/rekapager-doctrine-orm-adapter/composer.json @@ -1,6 +1,6 @@ { "name": "rekalogika/rekapager-doctrine-orm-adapter", - "description": "", + "description": "Doctrine ORM adapter for Rekapager pagination library", "homepage": "https://rekalogika.dev/rekapager", "keywords": [], "license": "MIT", diff --git a/packages/rekapager-keyset-pagination/composer.json b/packages/rekapager-keyset-pagination/composer.json index b95b1c3..9ed0620 100644 --- a/packages/rekapager-keyset-pagination/composer.json +++ b/packages/rekapager-keyset-pagination/composer.json @@ -1,6 +1,6 @@ { "name": "rekalogika/rekapager-keyset-pagination", - "description": "", + "description": "Keyset pagination component of the Rekapager pagination library", "homepage": "https://rekalogika.dev/rekapager", "keywords": [], "license": "MIT", diff --git a/packages/rekapager-offset-pagination/composer.json b/packages/rekapager-offset-pagination/composer.json index 7ca1c3c..04bf276 100644 --- a/packages/rekapager-offset-pagination/composer.json +++ b/packages/rekapager-offset-pagination/composer.json @@ -1,6 +1,6 @@ { "name": "rekalogika/rekapager-offset-pagination", - "description": "", + "description": "Offset pagination component of the Rekapager pagination library", "homepage": "https://rekalogika.dev/rekapager", "keywords": [], "license": "MIT",