1+ name : ' Split packages'
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - ' *'
9+
10+ jobs :
11+ packages_split :
12+ runs-on : ubuntu-latest
13+
14+ strategy :
15+ matrix :
16+ package :
17+ - local_path : ' packages/button'
18+ github_account : ' unlock-sh'
19+ github_repository : ' button-component'
20+ deploy_key : ' BUTTON_DEPLOY_KEY'
21+ target_branch : ' main'
22+ - local_path : ' packages/input'
23+ github_account : ' unlock-sh'
24+ github_repository : ' input-component'
25+ deploy_key : ' INPUT_DEPLOY_KEY'
26+ target_branch : ' main'
27+ steps :
28+ - uses : actions/checkout@v2
29+ - if : " !startsWith(github.ref, 'refs/tags/')"
30+ name : " Update package repository"
31+ uses : alphpaca/monoplus-split-action@2022.1-alpha3
32+ with :
33+ package_path : ' ${{ matrix.package.local_path }}'
34+ ssh_private_key : ${{ secrets[matrix.package.deploy_key] }}
35+ git_username : ' unlock-sh'
36+ git_email : ' git@unlock.sh'
37+ repository_owner : " ${{ matrix.package.github_account }}"
38+ repository_name : " ${{ matrix.package.github_repository }}"
39+ target_branch : " ${{ matrix.package.target_branch }}"
40+
41+ - if : " startsWith(github.ref, 'refs/tags/')"
42+ name : Extract tag
43+ id : extract_tag
44+ run : echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
45+
46+ - if : " startsWith(github.ref, 'refs/tags/')"
47+ name : " Create package tag"
48+ uses : alphpaca/monoplus-split-action@2022.1-alpha3
49+
50+ with :
51+ package_path : ' ${{ matrix.package.local_path }}'
52+ ssh_private_key : ${{ secrets[matrix.package.deploy_key] }}
53+ git_username : ' unlock-sh'
54+ git_email : ' git@unlock.sh'
55+ repository_owner : " ${{ matrix.package.github_account }}"
56+ repository_name : " ${{ matrix.package.github_repository }}"
57+ target_branch : " ${{ matrix.package.target_branch }}"
58+ tag : ${{ steps.extract_tag.outputs.TAG }}
0 commit comments