feat: add package splitter

This commit is contained in:
George Cushen 2022-02-08 19:25:00 +00:00
commit eb26160ea9

39
.github/workflows/split-packages.yaml vendored Normal file
View file

@ -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/<package-name><package-name>" directory
package_directory: 'starters/${{ matrix.package.local_path }}'
# ↓ into https://github.com/wowchemy/<package-name> 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"