-
-
Notifications
You must be signed in to change notification settings - Fork 15
113 lines (102 loc) · 2.69 KB
/
monorepo-split-packages.yml
File metadata and controls
113 lines (102 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: "Split Packages"
on:
push:
branches:
- main
env:
GITHUB_TOKEN: ${{ secrets.BOT }}
CORE_VERSION: "^3.0.3"
jobs:
packages_split:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- audit
- backup-server
- base-theme
- build
- cart
- category
- components
- core
- customer
- data
- devlink
- devops
- draft
- expiry
- featherlight
- file-icons
- flags
- forge
- frontend
- github
- google-icons
- impersonate
- item
- jobs
- json
- laravel-icons
- localization
- login-link
- markdown
- media
- module
- news
- notifications
- package-registry
- packages
- packagist
- page
- passkey
- permission
- post
- press
- product
- progress
- publish
- record
- restore
- security
- seo
- skeleton
- slug
- tag
- taxonomy
- trainings
- user
- user-device
- user-session
- website
- wishlist
steps:
- uses: actions/checkout@v4
# Search and replace "moox/core": "*" with "moox/core": "^3.0.3" in composer.json
- name: Replace core version in composer.json
working-directory: packages/${{ matrix.package }}
run: |
if [ -f composer.json ]; then
echo "Updating moox/core version in ${{ matrix.package }}"
sed -i 's/"moox\/core": "\*"/"moox\/core": "^3.0.3"/g' composer.json
fi
# Commit the updated composer.json (if there was a change)
- name: Commit changes
working-directory: packages/${{ matrix.package }}
run: |
if [ -f composer.json ]; then
git config --global user.name "mooxbot"
git config --global user.email "bot@moox.org"
git add composer.json
git commit -m "Update moox/core dependency to ^^3.0.3" || echo "No changes to commit"
fi
- if: "!startsWith(github.ref, 'refs/tags/')"
uses: "symplify/monorepo-split-github-action@v2.3.0"
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: "packages/${{ matrix.package }}"
repository_organization: "mooxphp"
repository_name: "${{ matrix.package }}"
user_name: "mooxbot"
user_email: "bot@moox.org"