|
| 1 | +name: Subsplit Libraries |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - '*' |
| 7 | + branches: |
| 8 | + - '*' |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +jobs: |
| 15 | + subsplit: |
| 16 | + name: Split Packages (${{ matrix.package.local_path }}) |
| 17 | + runs-on: ubuntu-latest |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + package: |
| 22 | + # - local_path: 'path/to/component' |
| 23 | + # split_repository: 'repository-name' |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v7 |
| 26 | + |
| 27 | + # no tag |
| 28 | + - if: "!startsWith(github.ref, 'refs/tags/')" |
| 29 | + name: Monorepo Split of ${{ matrix.package.split_repository }} |
| 30 | + uses: danharrin/monorepo-split-github-action@v2.4.5 |
| 31 | + env: |
| 32 | + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
| 33 | + with: |
| 34 | + branch: "master" |
| 35 | + package_directory: 'libs/${{ matrix.package.local_path }}' |
| 36 | + repository_organization: 'boson-php' |
| 37 | + repository_name: '${{ matrix.package.split_repository }}' |
| 38 | + user_name: "SerafimArts" |
| 39 | + user_email: "nesk@xakep.ru" |
| 40 | + |
| 41 | + # with tag |
| 42 | + - if: "startsWith(github.ref, 'refs/tags/')" |
| 43 | + name: Monorepo Tagged Split of ${{ matrix.package }} |
| 44 | + uses: danharrin/monorepo-split-github-action@v2.4.5 |
| 45 | + env: |
| 46 | + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
| 47 | + with: |
| 48 | + tag: ${GITHUB_REF#refs/tags/} |
| 49 | + branch: "master" |
| 50 | + package_directory: 'libs/${{ matrix.package.local_path }}' |
| 51 | + repository_organization: 'boson-php' |
| 52 | + repository_name: '${{ matrix.package.split_repository }}' |
| 53 | + user_name: "SerafimArts" |
| 54 | + user_email: "nesk@xakep.ru" |
0 commit comments