Skip to content

chore(ci): add submodules and update release process #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 84 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
8ee3c61
chore: provide token to checkout submodule
eunjae-lee Feb 23, 2022
acda81e
Merge branch 'main' into chore/release
eunjae-lee Feb 23, 2022
dfa8c29
Merge branch 'main' into chore/release
eunjae-lee Feb 23, 2022
c484dc7
chore(ci): remove pipe function
eunjae-lee Feb 23, 2022
cac59d5
chore(ci): set author identity
eunjae-lee Feb 23, 2022
4b87271
chore(ci): set git config globally
eunjae-lee Feb 23, 2022
f5d5663
chore(ci): update monorepo after submodule changes
eunjae-lee Feb 23, 2022
31d4cf6
chore: update submodules
Feb 23, 2022
7ea9c6c
chore(ci): fix copy path
eunjae-lee Feb 23, 2022
e1d7bf6
Merge branch 'chore/release' of github.com:algolia/api-clients-automa…
eunjae-lee Feb 23, 2022
68d89fe
chore: update submodules
Feb 23, 2022
cc42068
chore: update submodule
eunjae-lee Feb 23, 2022
44de550
Merge branch 'chore/release' of github.com:algolia/api-clients-automa…
eunjae-lee Feb 23, 2022
1549109
chore(ci): fix copy command
eunjae-lee Feb 23, 2022
58e83d4
chore(ci): fix copy
eunjae-lee Feb 23, 2022
772ba78
Merge branch 'main' of github.com:algolia/api-clients-automation into…
eunjae-lee Feb 23, 2022
7ec4043
chore: update submodules
Feb 23, 2022
118a751
Merge branch 'chore/release' of github.com:algolia/api-clients-automa…
eunjae-lee Feb 23, 2022
44e563d
chore(ci): fix copy command
eunjae-lee Feb 24, 2022
5b84a78
chore: update submodules
Feb 24, 2022
a00d022
chore: update submodules
Feb 24, 2022
ad4d952
chore(ci): update script
eunjae-lee Feb 24, 2022
ac978cf
chore: update submodules
Feb 24, 2022
6c0fc7c
chore: remove dummy submodule
eunjae-lee Feb 25, 2022
e0d11d0
chore: remove generated clients
eunjae-lee Feb 25, 2022
8c72099
chore(ci): set up real submodules
eunjae-lee Feb 25, 2022
d021de4
Merge branch 'main' into chore/release
eunjae-lee Feb 25, 2022
d44abef
chore: re-apply changes
eunjae-lee Feb 25, 2022
ba264f6
chore: support real submodules
eunjae-lee Feb 25, 2022
fd286ee
chore: update released tag
eunjae-lee Feb 25, 2022
19a569e
docs: update submodules.md
eunjae-lee Feb 28, 2022
6897e19
chore: update reference to js client
eunjae-lee Feb 28, 2022
e013b12
Merge branch 'main' of github.com:algolia/api-clients-automation into…
eunjae-lee Feb 28, 2022
7836432
chore: update workspace config
eunjae-lee Feb 28, 2022
8f3287c
chore: update issue template
eunjae-lee Feb 28, 2022
9ff4a37
chore: update issue template
eunjae-lee Feb 28, 2022
6f19e5c
chore: update submodule after checking out
eunjae-lee Feb 28, 2022
f16b5bc
chore: fix script
eunjae-lee Feb 28, 2022
ad71294
chore: update reference to js client
eunjae-lee Feb 28, 2022
7e8f206
chore: update yarn workspace
eunjae-lee Feb 28, 2022
216bb06
chore: update reference to js client
eunjae-lee Feb 28, 2022
7d91055
Merge branch 'main' into chore/release
eunjae-lee Mar 1, 2022
7e46818
docs: update guide
eunjae-lee Mar 1, 2022
571cdd3
Merge branch 'main' into chore/release
eunjae-lee Mar 1, 2022
a27849c
Merge branch 'main' into chore/release
eunjae-lee Mar 1, 2022
089b266
chore: update submodule
eunjae-lee Mar 1, 2022
067b4ee
chore: add log
eunjae-lee Mar 1, 2022
033ddac
fix: fix clientPath
eunjae-lee Mar 1, 2022
67f3acd
add log
eunjae-lee Mar 1, 2022
b4a1813
add log
eunjae-lee Mar 1, 2022
4cc3a60
chore: add log
eunjae-lee Mar 1, 2022
a395123
chore: try something else
eunjae-lee Mar 1, 2022
5004d6c
chore: test
eunjae-lee Mar 1, 2022
114ebf2
chore: remove log
eunjae-lee Mar 1, 2022
b00a222
chore: remove javascript repo from submodule
eunjae-lee Mar 1, 2022
36609f5
chore: add javascript repo as submodule again
eunjae-lee Mar 1, 2022
020dbc6
chore: update reference to js repo
eunjae-lee Mar 2, 2022
22a1e49
chore: update reference to submodules
eunjae-lee Mar 2, 2022
7edb048
chore: fix changelog path
eunjae-lee Mar 2, 2022
3a1c4c7
chore: configure git author in submodules before commiting
eunjae-lee Mar 2, 2022
e7da3a8
chore: add debug code
eunjae-lee Mar 2, 2022
336ba6b
chore: fix client path
eunjae-lee Mar 2, 2022
4215d66
chore: make it fail-safe
eunjae-lee Mar 2, 2022
a89cdbf
chore: fetch tag before updating it
eunjae-lee Mar 2, 2022
43fa93e
chore: update reference to submodule
eunjae-lee Mar 2, 2022
40fd3f7
Merge branch 'main' into chore/release
eunjae-lee Mar 2, 2022
ecf5ae8
chore: fix GHA
eunjae-lee Mar 2, 2022
59cf0d9
chore: fix broken GHA
eunjae-lee Mar 2, 2022
8b6ae7f
chore: provide token as env var
eunjae-lee Mar 2, 2022
8d4ba9d
chore: move submodule related logic out of action.yml
eunjae-lee Mar 2, 2022
8582769
chore: extract as actions/submodule
eunjae-lee Mar 2, 2022
67ba982
chore: add missing properties
eunjae-lee Mar 2, 2022
787dbf6
chore: fix submodule action
eunjae-lee Mar 2, 2022
4127260
chore: adding composite
eunjae-lee Mar 2, 2022
a51689b
chore: remove unused env var
eunjae-lee Mar 2, 2022
6d9a27e
chore: update reference to submodule
eunjae-lee Mar 2, 2022
3c898f3
Merge branch 'main' into chore/release
eunjae-lee Mar 2, 2022
4caeeec
docs: update submodules.md
eunjae-lee Mar 2, 2022
4d3a470
Merge branch 'main' into chore/release
eunjae-lee Mar 2, 2022
08e3d43
chore: update description of GHA
eunjae-lee Mar 2, 2022
e7e93be
Merge branch 'chore/release' of github.com:algolia/api-clients-automa…
eunjae-lee Mar 2, 2022
751131d
chore: fix GHA lint error
eunjae-lee Mar 2, 2022
3a4d702
chore: fix yaml lint error
eunjae-lee Mar 2, 2022
73391de
chore: remove debugging code
eunjae-lee Mar 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .github/actions/submodule/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Submodule

description: Update submodules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add here why we need this action?

# because actions/checkout@v2 does not pull submodule repositories out of the box

inputs:
token:
# We can use personal access token with repo ACL
description: GitHub Token
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need specific ACLs?

required: true

runs:
using: composite
steps:
- name: Update submodules
id: update-submodules
shell: bash
run: |
git config --file .gitmodules --get-regexp url | while read url; do
git config --file=.gitmodules $(echo "$url" | sed -E "s/[email protected]:|https:\/\/github.com\//https:\/\/${{ inputs.token }}:${{ inputs.token }}@github.com\//")
done
git submodule sync
git submodule update --init --recursive
32 changes: 32 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
with:
fetch-depth: 0

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Setup
id: setup
uses: ./.github/actions/setup
Expand Down Expand Up @@ -56,6 +60,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache

Expand All @@ -81,6 +89,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand Down Expand Up @@ -110,6 +122,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand Down Expand Up @@ -148,6 +164,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand Down Expand Up @@ -187,6 +207,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand Down Expand Up @@ -218,6 +242,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
id: restore
uses: ./.github/actions/cache
Expand All @@ -242,6 +270,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
id: restore
uses: ./.github/actions/cache
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/process-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ jobs:
submodules: recursive
token: ${{ secrets.TOKEN_RELEASE_BOT }}

- run: git checkout chore/release

- run: |
git config --file .gitmodules --get-regexp url | while read url; do
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\//")
done
git submodule sync
git submodule update --init --recursive
- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Setup
id: setup
Expand All @@ -37,4 +32,3 @@ jobs:
env:
EVENT_NUMBER: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE_BOT }}
RELEASE_TEST: ${{ secrets.RELEASE_TEST }}
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "clients/algoliasearch-client-java-2"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a branch to specify somewhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok it's in the config, make sense

path = clients/algoliasearch-client-java-2
url = [email protected]:algolia/algoliasearch-client-java-2.git
[submodule "clients/algoliasearch-client-javascript"]
path = clients/algoliasearch-client-javascript
url = [email protected]:algolia/algoliasearch-client-javascript.git
[submodule "clients/algoliasearch-client-php"]
path = clients/algoliasearch-client-php
url = [email protected]:algolia/algoliasearch-client-php.git
1 change: 1 addition & 0 deletions clients/algoliasearch-client-java-2
20 changes: 0 additions & 20 deletions clients/algoliasearch-client-java-2/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions clients/algoliasearch-client-java-2/.openapi-generator-ignore

This file was deleted.

This file was deleted.

Loading