Skip to content

Commit

Permalink
monorepo split settings
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Mar 30, 2024
1 parent 9460eda commit 453cd22
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 7 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/split.yml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion packages/rekapager-bundle/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekalogika/rekapager-bundle",
"description": "",
"description": "Symfony bundle for the Rekapager library",
"homepage": "https://rekalogika.dev/rekapager",
"keywords": [],
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/rekapager-contracts/composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/rekapager-core/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekalogika/rekapager-core",
"description": "",
"description": "Core functionality of Rekapager pagination library",
"homepage": "https://rekalogika.dev/rekapager",
"keywords": [],
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/rekapager-doctrine-orm-adapter/composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/rekapager-keyset-pagination/composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/rekapager-offset-pagination/composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 453cd22

Please sign in to comment.