Skip to content

Commit 7f28580

Browse files
authored
Dicd/symplify (#445)
Better monorepo-builder config
1 parent 90a0abf commit 7f28580

File tree

31 files changed

+290
-166
lines changed

31 files changed

+290
-166
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/.editorconfig export-ignore
88
/.gitattributes export-ignore
99
/.gitignore export-ignore
10-
/.gitsplit.yml export-ignore
10+
/monorepo-builder.php export-ignore
1111
/CODE_OF_CONDUCT.md export-ignore
1212
/deptrac.yaml export-ignore
1313
/ecs.php export-ignore

.github/workflows/gitsplit.yml

Lines changed: 130 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,137 @@ on:
33
push:
44
tags:
55
- '*'
6-
release:
7-
types: [published]
6+
7+
env:
8+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
89

910
jobs:
10-
gitsplit:
11+
packages_split:
1112
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
# define package to repository map
18+
package:
19+
-
20+
local_path: 'src/Component/Core'
21+
split_repository: 'jwt-core'
22+
-
23+
local_path: 'src/Component/Checker'
24+
split_repository: 'jwt-checker'
25+
-
26+
local_path: 'src/Component/Signature'
27+
split_repository: 'jwt-signature'
28+
-
29+
local_path: 'src/Component/Encryption'
30+
split_repository: 'jwt-encryption'
31+
-
32+
local_path: 'src/Component/KeyManagement'
33+
split_repository: 'jwt-key-mgmt'
34+
-
35+
local_path: 'src/Component/Console'
36+
split_repository: 'jwt-console'
37+
-
38+
local_path: 'src/Component/NestedToken'
39+
split_repository: 'jwt-nested-token'
40+
-
41+
local_path: 'src/Bundle/JoseFramework'
42+
split_repository: 'jwt-bundle'
43+
-
44+
local_path: 'src/EncryptionAlgorithm/ContentEncryption/AESCBC'
45+
split_repository: 'jwt-encryption-algorithm-aescbc'
46+
-
47+
local_path: 'src/EncryptionAlgorithm/ContentEncryption/AESGCM'
48+
split_repository: 'jwt-encryption-algorithm-aesgcm'
49+
-
50+
local_path: 'src/EncryptionAlgorithm/KeyEncryption/AESGCMKW'
51+
split_repository: 'jwt-encryption-algorithm-aesgcmkw'
52+
-
53+
local_path: 'src/EncryptionAlgorithm/KeyEncryption/AESKW'
54+
split_repository: 'jwt-encryption-algorithm-aeskw'
55+
-
56+
local_path: 'src/EncryptionAlgorithm/KeyEncryption/Direct'
57+
split_repository: 'jwt-encryption-algorithm-dir'
58+
-
59+
local_path: 'src/EncryptionAlgorithm/KeyEncryption/ECDHES'
60+
split_repository: 'jwt-encryption-algorithm-ecdh-es'
61+
-
62+
local_path: 'src/EncryptionAlgorithm/KeyEncryption/PBES2'
63+
split_repository: 'jwt-encryption-algorithm-pbes2'
64+
-
65+
local_path: 'src/EncryptionAlgorithm/KeyEncryption/RSA'
66+
split_repository: 'jwt-encryption-algorithm-rsa'
67+
-
68+
local_path: 'src/SignatureAlgorithm/ECDSA'
69+
split_repository: 'jwt-signature-algorithm-ecdsa'
70+
-
71+
local_path: 'src/SignatureAlgorithm/EdDSA'
72+
split_repository: 'jwt-signature-algorithm-eddsa'
73+
-
74+
local_path: 'src/SignatureAlgorithm/None'
75+
split_repository: 'jwt-signature-algorithm-none'
76+
-
77+
local_path: 'src/SignatureAlgorithm/HMAC'
78+
split_repository: 'jwt-signature-algorithm-hmac'
79+
-
80+
local_path: 'src/SignatureAlgorithm/RSA'
81+
split_repository: 'jwt-signature-algorithm-rsa'
82+
-
83+
local_path: 'src/SignatureAlgorithm/Experimental'
84+
split_repository: 'jwt-signature-algorithm-experimental'
85+
-
86+
local_path: 'src/EncryptionAlgorithm/Experimental'
87+
split_repository: 'jwt-encryption-algorithm-experimental'
88+
-
89+
local_path: 'src/Ecc'
90+
split_repository: 'jwt-util-ecc'
91+
-
92+
local_path: 'packs/encryption'
93+
split_repository: 'encryption-pack'
94+
-
95+
local_path: 'packs/signature'
96+
split_repository: 'signature-pack'
97+
1298
steps:
13-
- name: checkout
14-
run: git clone https://github.com/web-token/jwt-framework /home/runner/work/web-token/jwt-framework && cd /home/runner/work/web-token/jwt-framework
15-
- name: Split repositories
16-
run: docker run --rm -t -e GH_TOKEN -v /cache/gitsplit:/cache/gitsplit -v /home/runner/work/web-token/jwt-framework:/srv jderusse/gitsplit gitsplit
17-
env:
18-
GH_TOKEN: ${{ secrets.GITSPLIT_TOKEN }}
99+
- uses: actions/checkout@v2
100+
101+
# no tag
102+
-
103+
if: "!startsWith(github.ref, 'refs/tags/')"
104+
uses: "symplify/monorepo-split-github-action@2.1"
105+
with:
106+
# ↓ split "src/*" directory
107+
package_directory: '${{ matrix.package.local_path }}'
108+
109+
# ↓ into https://github.com/web-token/* repository
110+
repository_organization: 'web-token'
111+
repository_name: '${{ matrix.package.split_repository }}'
112+
113+
# [optional, with "github.com" as default]
114+
#repository_host: git.private.com:1234
115+
116+
# ↓ the user signed under the split commit
117+
user_name: "Florent Morselli"
118+
user_email: "florent.morselli@spomky-labs.com"
119+
120+
# with tag
121+
-
122+
if: "startsWith(github.ref, 'refs/tags/')"
123+
uses: "symplify/monorepo-split-github-action@2.1"
124+
with:
125+
tag: ${GITHUB_REF#refs/tags/}
126+
127+
# ↓ split "src/*" directory
128+
package_directory: '${{ matrix.package.local_path }}'
129+
130+
# ↓ into https://github.com/web-token/* repository
131+
repository_organization: 'web-token'
132+
repository_name: '${{ matrix.package.split_repository }}'
133+
134+
# [optional, with "github.com" as default]
135+
#repository_host: git.private.com:1234
136+
137+
# ↓ the user signed under the split commit
138+
user_name: "Florent Morselli"
139+
user_email: "florent.morselli@spomky-labs.com"

.github/workflows/tweet.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitsplit.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)