.github/workflows/subsplit.yml
name: subsplit
on:
push:
tags:
- '*'
branches:
- '*'
jobs:
subsplit:
name: Split Packages (${{ matrix.package.local_path }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
# Kernel Libraries
- local_path: 'compiler'
split_repository: 'compiler'
- local_path: 'lexer'
split_repository: 'lexer'
- local_path: 'parser'
split_repository: 'parser'
- local_path: 'position'
split_repository: 'position'
- local_path: 'source'
split_repository: 'source'
- local_path: 'visitor'
split_repository: 'visitor'
# Contracts
- local_path: 'contracts/ast'
split_repository: 'ast-contracts'
- local_path: 'contracts/lexer'
split_repository: 'lexer-contracts'
- local_path: 'contracts/parser'
split_repository: 'parser-contracts'
- local_path: 'contracts/position'
split_repository: 'position-contracts'
- local_path: 'contracts/source'
split_repository: 'source-contracts'
# Metadata
- local_path: 'meta/runtime'
split_repository: 'runtime'
# Documentation
- local_path: '../docs'
split_repository: 'docs'
steps:
- uses: actions/checkout@v4
# no tag
- if: "!startsWith(github.ref, 'refs/tags/')"
name: Monorepo Split of ${{ matrix.package.split_repository }}
uses: danharrin/monorepo-split-github-action@v2.3.0
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
branch: "master"
package_directory: 'libs/${{ matrix.package.local_path }}'
repository_organization: 'phplrt'
repository_name: '${{ matrix.package.split_repository }}'
user_name: "SerafimArts"
user_email: "nesk@xakep.ru"
# with tag
- if: "startsWith(github.ref, 'refs/tags/')"
name: Monorepo Tagged Split of ${{ matrix.package }}
uses: danharrin/monorepo-split-github-action@v2.3.0
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
branch: "master"
package_directory: 'libs/${{ matrix.package.local_path }}'
repository_organization: 'phplrt'
repository_name: '${{ matrix.package.split_repository }}'
user_name: "SerafimArts"
user_email: "nesk@xakep.ru"