|
3 | 3 | push:
|
4 | 4 | tags:
|
5 | 5 | - '*'
|
6 |
| - release: |
7 |
| - types: [published] |
| 6 | + |
| 7 | +env: |
| 8 | + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
8 | 9 |
|
9 | 10 | jobs:
|
10 |
| - gitsplit: |
| 11 | + packages_split: |
11 | 12 | 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 | + |
12 | 98 | 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" |
0 commit comments