[CI] use monorepo-split action to split packages

This commit is contained in:
Tomas Votruba 2020-11-14 20:25:20 +00:00
parent 2ea43de66d
commit 9d7fa63bf8

View File

@ -19,16 +19,25 @@ jobs:
name: Monorepo Split of ${{ matrix.package_name }}
steps:
- uses: actions/checkout@v2
# https://github.com/cpina/github-action-push-to-another-repository
-
uses: cpina/github-action-push-to-another-repository@master
env:
API_TOKEN_GITHUB: ${{ secrets.ACCESS_TOKEN }}
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:
source-directory: 'packages/${{ matrix.package_name }}'
destination-github-username: 'rectorphp'
destination-repository-name: '${{ matrix.package_name }}'
user-email: tomas@getrector.org
target-branch: master
fetch-depth: 0
# see https://github.com/WyriHaximus/github-action-get-previous-tag
-
id: previous_tag
uses: "WyriHaximus/github-action-get-previous-tag@master"
# see https://github.com/TomasVotruba/github-action-monorepo-split
-
uses: TomasVotruba/github-action-monorepo-split@master
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
package-directory: 'packages/${{ matrix.package_name }}'
split-repository-organization: 'rectorphp'
split-repository-name: '${{ matrix.package_name }}'
tag: ${{ steps.previous_tag.outputs.tag }}