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