From eb26160ea904a3de8471cea97c0f1f0d8ee79b32 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Tue, 8 Feb 2022 19:25:00 +0000 Subject: [PATCH] feat: add package splitter --- .github/workflows/split-packages.yaml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/split-packages.yaml diff --git a/.github/workflows/split-packages.yaml b/.github/workflows/split-packages.yaml new file mode 100644 index 00000000..b6a66880 --- /dev/null +++ b/.github/workflows/split-packages.yaml @@ -0,0 +1,39 @@ +name: 'Package Splitter' + +on: + push: + branches: + - main + +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: 'markdown-slides' + split_repository: 'starter-hugo-markdown-slides' + + steps: + - uses: actions/checkout@v2 + + # step if no tag is pushed + - if: "!startsWith(github.ref, 'refs/tags/')" + uses: "symplify/monorepo-split-github-action@2.1" + with: + # ↓ split "packages/" directory + package_directory: 'starters/${{ matrix.package.local_path }}' + + # ↓ into https://github.com/wowchemy/ repository + repository_organization: 'wowchemy' + repository_name: '${{ matrix.package.split_repository }}' + + # ↓ the user signed under the split commit + user_name: "Splitter Bot" + user_email: "no.reply@wowchemy.com"