Skip to content

Commit a4f644f

Browse files
eunjae-leeapi-clients-bot
and
api-clients-bot
authored
chore(ci): add submodules and update release process (#221)
* chore: provide token to checkout submodule * chore(ci): remove pipe function * chore(ci): set author identity * chore(ci): set git config globally * chore(ci): update monorepo after submodule changes * chore: update submodules * chore(ci): fix copy path * chore: update submodules * chore: update submodule * chore(ci): fix copy command * chore(ci): fix copy * chore: update submodules * chore(ci): fix copy command * chore: update submodules * chore: update submodules * chore(ci): update script * chore: update submodules * chore: remove dummy submodule * chore: remove generated clients * chore(ci): set up real submodules * chore: re-apply changes * chore: support real submodules * chore: update released tag * docs: update submodules.md * chore: update reference to js client * chore: update workspace config * chore: update issue template * chore: update issue template * chore: update submodule after checking out * chore: fix script * chore: update reference to js client * chore: update yarn workspace * chore: update reference to js client * docs: update guide * chore: update submodule * chore: add log * fix: fix clientPath * add log * add log * chore: add log * chore: try something else * chore: test * chore: remove log * chore: remove javascript repo from submodule * chore: add javascript repo as submodule again * chore: update reference to js repo * chore: update reference to submodules * chore: fix changelog path * chore: configure git author in submodules before commiting * chore: add debug code * chore: fix client path * chore: make it fail-safe * chore: fetch tag before updating it * chore: update reference to submodule * chore: fix GHA * chore: fix broken GHA * chore: provide token as env var * chore: move submodule related logic out of action.yml * chore: extract as actions/submodule * chore: add missing properties * chore: fix submodule action * chore: adding composite * chore: remove unused env var * chore: update reference to submodule * docs: update submodules.md * chore: update description of GHA * chore: fix GHA lint error * chore: fix yaml lint error * chore: remove debugging code Co-authored-by: api-clients-bot <[email protected]>
1 parent 823799f commit a4f644f

File tree

527 files changed

+324
-64963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

527 files changed

+324
-64963
lines changed

.github/actions/submodule/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Submodule
2+
3+
description: Update submodules
4+
# because actions/checkout@v2 does not pull submodule repositories out of the box
5+
6+
inputs:
7+
token:
8+
# We can use personal access token with repo ACL
9+
description: GitHub Token
10+
required: true
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Update submodules
16+
id: update-submodules
17+
shell: bash
18+
run: |
19+
git config --file .gitmodules --get-regexp url | while read url; do
20+
git config --file=.gitmodules $(echo "$url" | sed -E "s/[email protected]:|https:\/\/github.com\//https:\/\/${{ inputs.token }}:${{ inputs.token }}@github.com\//")
21+
done
22+
git submodule sync
23+
git submodule update --init --recursive

.github/workflows/check.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26+
- uses: ./.github/actions/submodule
27+
with:
28+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
29+
2630
- name: Setup
2731
id: setup
2832
uses: ./.github/actions/setup
@@ -56,6 +60,10 @@ jobs:
5660
steps:
5761
- uses: actions/checkout@v2
5862

63+
- uses: ./.github/actions/submodule
64+
with:
65+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
66+
5967
- name: Restore cache
6068
uses: ./.github/actions/cache
6169

@@ -81,6 +89,10 @@ jobs:
8189
steps:
8290
- uses: actions/checkout@v2
8391

92+
- uses: ./.github/actions/submodule
93+
with:
94+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
95+
8496
- name: Restore cache
8597
uses: ./.github/actions/cache
8698
with:
@@ -110,6 +122,10 @@ jobs:
110122
steps:
111123
- uses: actions/checkout@v2
112124

125+
- uses: ./.github/actions/submodule
126+
with:
127+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
128+
113129
- name: Restore cache
114130
uses: ./.github/actions/cache
115131
with:
@@ -148,6 +164,10 @@ jobs:
148164
steps:
149165
- uses: actions/checkout@v2
150166

167+
- uses: ./.github/actions/submodule
168+
with:
169+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
170+
151171
- name: Restore cache
152172
uses: ./.github/actions/cache
153173
with:
@@ -187,6 +207,10 @@ jobs:
187207
steps:
188208
- uses: actions/checkout@v2
189209

210+
- uses: ./.github/actions/submodule
211+
with:
212+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
213+
190214
- name: Restore cache
191215
uses: ./.github/actions/cache
192216
with:
@@ -218,6 +242,10 @@ jobs:
218242
steps:
219243
- uses: actions/checkout@v2
220244

245+
- uses: ./.github/actions/submodule
246+
with:
247+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
248+
221249
- name: Restore cache
222250
id: restore
223251
uses: ./.github/actions/cache
@@ -242,6 +270,10 @@ jobs:
242270
steps:
243271
- uses: actions/checkout@v2
244272

273+
- uses: ./.github/actions/submodule
274+
with:
275+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
276+
245277
- name: Restore cache
246278
id: restore
247279
uses: ./.github/actions/cache

.github/workflows/process-release.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ jobs:
2020
submodules: recursive
2121
token: ${{ secrets.TOKEN_RELEASE_BOT }}
2222

23-
- run: git checkout chore/release
24-
25-
- run: |
26-
git config --file .gitmodules --get-regexp url | while read url; do
27-
git config --file=.gitmodules $(echo "$url" | sed -E "s/[email protected]:|https:\/\/github.com\//https:\/\/${{ secrets.TOKEN_RELEASE_BOT }}:${{ secrets.TOKEN_RELEASE_BOT }}@github.com\//")
28-
done
29-
git submodule sync
30-
git submodule update --init --recursive
23+
- uses: ./.github/actions/submodule
24+
with:
25+
token: $${{ secrets.TOKEN_RELEASE_BOT }}
3126

3227
- name: Setup
3328
id: setup
@@ -37,4 +32,3 @@ jobs:
3732
env:
3833
EVENT_NUMBER: ${{ github.event.issue.number }}
3934
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE_BOT }}
40-
RELEASE_TEST: ${{ secrets.RELEASE_TEST }}

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[submodule "clients/algoliasearch-client-java-2"]
2+
path = clients/algoliasearch-client-java-2
3+
url = [email protected]:algolia/algoliasearch-client-java-2.git
4+
[submodule "clients/algoliasearch-client-javascript"]
5+
path = clients/algoliasearch-client-javascript
6+
url = [email protected]:algolia/algoliasearch-client-javascript.git
7+
[submodule "clients/algoliasearch-client-php"]
8+
path = clients/algoliasearch-client-php
9+
url = [email protected]:algolia/algoliasearch-client-php.git

clients/algoliasearch-client-java-2/.gitignore

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

clients/algoliasearch-client-java-2/.openapi-generator-ignore

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

clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/ApiCallback.java

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

0 commit comments

Comments
 (0)