Merge branch 'cs-upgrade' #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# On `git push --tags`, or `git push origin main`, | |
# for each folder in `./packages`, extract commit changes related to their path, | |
# and pushes them to the mapped github repo. | |
# | |
# ```yaml | |
# jobs: | |
# split_monorepo: | |
# strategy: | |
# matrix: | |
# package: | |
# - 'test-package' | |
# steps: | |
# - | |
# with: | |
# package_directory: 'packages/${GITHUB_REF#refs/tags/}' | |
# repository_organization: 'gnugat' | |
# repository_name: '${{ matrix.package.split_repository }}' | |
# ``` | |
# | |
# Will take the commit changes targetting `./packages/test-package`, | |
# and push them to `https://github.com/gnugat/ssc-test-package`. | |
# | |
# Uses https://github.com/claudiodekker/splitsh-action | |
### | |
name: Split Monorepo | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- '*' | |
jobs: | |
split_monorepo: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
- cs | |
- exception | |
steps: | |
- | |
name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0i | |
- | |
name: Split package ${{ matrix.packagei }} | |
uses: "claudiodekker/[email protected]" | |
env: | |
GITHUB_TOKEN: ${{ secrets.MONOREPO_SPLITTER_PERSONAL_ACCESS_TOKEN }} | |
with: | |
prefix: "packages/${{ matrix.package }}" | |
remote: "https://github.com/gnugat/ssc-${{ matrix.package }}.git" | |
reference: "${{ github.ref_name }}" | |
as_tag: "${{ startsWith(github.ref, 'refs/tags/') }}" |