|
1 | | -name: Split Packages |
| 1 | +name: 'Packages Split' |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - paths: |
8 | | - - 'src/**' |
9 | | - tags: |
10 | | - - '*' |
11 | | - workflow_dispatch: ~ |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + branch: |
| 7 | + description: 'Branch to checkout and split. Ignored if tag is specified. At least one required.' |
| 8 | + required: false |
| 9 | + type: string |
| 10 | + tag: |
| 11 | + description: 'Tag to checkout and split. Takes priority over branch. At least one required.' |
| 12 | + required: false |
| 13 | + type: string |
12 | 14 |
|
13 | 15 | jobs: |
14 | | - ci: |
15 | | - name: "Continuous Integration" |
16 | | - uses: ./.github/workflows/ci.yaml |
17 | | - split_monorepo: |
18 | | - name: "Split packages" |
19 | | - #needs: ci |
| 16 | + split_packages: |
| 17 | + name: Split ${{ matrix.package.repository }} |
20 | 18 | runs-on: ubuntu-latest |
21 | 19 | strategy: |
22 | 20 | fail-fast: false |
23 | 21 | matrix: |
24 | 22 | package: |
25 | | - - { name: 'AdminUi' } |
26 | | - - { name: 'BootstrapAdminUi' } |
27 | | - - { name: 'TwigExtra' } |
28 | | - - { name: 'TwigHooks' } |
29 | | - - { name: 'UiTranslations' } |
30 | | - steps: |
31 | | - - uses: actions/checkout@v3 |
32 | | - with: |
33 | | - fetch-depth: 0 |
| 23 | + - |
| 24 | + directory: src/AdminUi |
| 25 | + repository: AdminUi |
| 26 | + - |
| 27 | + directory: src/BootstrapAdminUi |
| 28 | + repository: BootstrapAdminUi |
| 29 | + - |
| 30 | + directory: src/TwigExtra |
| 31 | + repository: TwigExtra |
| 32 | + - |
| 33 | + directory: src/TwigHooks |
| 34 | + repository: TwigHooks |
| 35 | + - |
| 36 | + directory: src/UiTranslations |
| 37 | + repository: UiTranslations |
34 | 38 |
|
35 | | - - name: Split of ${{ matrix.package.name }} |
36 | | - uses: alphpaca/monoplus-split-action@2022.1-beta3 |
| 39 | + steps: |
| 40 | + - name: Split package |
| 41 | + uses: SyliusLabs/SplitPackageAction@v1.1 |
37 | 42 | with: |
38 | | - package_path: 'src/${{ matrix.package.name }}' |
39 | | - personal_access_token: ${{ secrets.MONOPLUS_PAT }} |
40 | | - git_username: 'GSadee' |
41 | | - git_email: 'sadowskigp@gmail.com' |
42 | | - repository_owner: "Sylius" |
43 | | - repository_name: "${{ matrix.package.name }}" |
| 43 | + directory: ${{ matrix.package.directory }} |
| 44 | + repository: ${{ matrix.package.repository }} |
| 45 | + branch: ${{ github.event.inputs.branch }} |
| 46 | + tag: ${{ github.event.inputs.tag }} |
| 47 | + token: ${{ secrets.SPLIT_TOKEN }} |
0 commit comments