-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.56 KB
/
monorepo-split.yml
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
name: "Split Packages"
on:
push:
branches:
- main
env:
GITHUB_TOKEN: ${{ secrets.BOT }}
jobs:
packages_split:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- backup-server-ui
- devops
steps:
- uses: actions/checkout@v4
# Search and replace "moox/core": "*" with "moox/core": "^2.1.6" 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": "^2.1.6"/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 "[email protected]"
git add composer.json
git commit -m "Update moox/core dependency to ^^2.1.6" || echo "No changes to commit"
fi
- if: "!startsWith(github.ref, 'refs/tags/')"
uses: "symplify/[email protected]"
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: "packages/${{ matrix.package }}"
repository_organization: "mooxphp"
repository_name: "${{ matrix.package }}"
user_name: "mooxbot"
user_email: "[email protected]"