Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
maximize-2

GitHub Action

Monorepo Split

1.0.1

Monorepo Split

maximize-2

Monorepo Split

Split monorepo packages to many repositories

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Monorepo Split

uses: danharrin/[email protected]

Learn more about this action in danharrin/monorepo-split-github-action

Choose a version

GitHub Action for Monorepo Split

Based heavily on cpina/github-action-push-to-another-repository, with focus on automated monorepo splits.

Example

Split Packages With Tag

name: 'Monorepo Split With Tag'

on:
    push:
        branches:
            - main

jobs:
    monorepo_split_test_with_tag:
        runs-on: ubuntu-latest

        steps:
            -
                uses: actions/checkout@v2
                # this is required for "WyriHaximus/github-action-get-previous-tag" workflow
                # see https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
                with:
                    fetch-depth: 0

            # see https://github.com/WyriHaximus/github-action-get-previous-tag
            -
                id: previous_tag
                uses: "WyriHaximus/github-action-get-previous-tag@master"

            -
                uses: "symplify/monorepo-split-github-action@1"
                env:
                    GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
                with:
                    # ↓ split "packages/easy-coding-standard" directory
                    package-directory: 'packages/easy-coding-standard'

                    # ↓ into https://github.com/symplify/easy-coding-standard repository
                    split-repository-organization: 'symplify'
                    split-repository-name: 'easy-coding-standard'

                    tag: ${{ steps.previous_tag.outputs.tag }}

                    # ↓ the user signed under the split commit
                    user-name: "kaizen-ci"
                    user-email: "[email protected]"