-
-
Notifications
You must be signed in to change notification settings - Fork 112
42 lines (38 loc) · 1.44 KB
/
split-releases.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
name: Split releases
on:
release:
branches: ['3.x']
types: ['published']
concurrency:
group: split
env:
GH_TOKEN: ${{ secrets.SUPER_ACCESS_TOKEN }}
jobs:
split:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- { namespace: AssetManager, repo: asset-manager }
- { namespace: ColorManager, repo: color-manager }
- { namespace: Contracts, repo: contracts }
- { namespace: Core, repo: core }
- { namespace: Laravel, repo: laravel }
- { namespace: MenuManager, repo: menu-manager }
- { namespace: Support, repo: support }
- { namespace: UI, repo: ui }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- run: |
split_sha=`git subtree split --prefix=src/${{ matrix.package.namespace }}`
repo_url="https://${{ secrets.SUPER_ACCESS_TOKEN }}@github.com/moonshine-software/${{ matrix.package.repo }}.git"
if [ -z $(git ls-remote --tags "$repo_url" | grep "$split_sha") ]; then \
gh release create ${{ github.ref_name }} \
--repo moonshine-software/${{ matrix.package.repo }} \
--target "$split_sha" \
--generate-notes \
--notes '[Full release information in MoonShine monorepo](https://github.com/moonshine-software/moonshine/releases/tag/${{ github.ref_name }}).'; \
fi