Skip to content

Commit

Permalink
docs: document git user config before trigger workflow (#991)
Browse files Browse the repository at this point in the history
* docs: show examples of git user config in trigger workflow

* ci: add git user config in trigger ci job
  • Loading branch information
dhayab committed Jan 9, 2023
1 parent 28b5053 commit 1ecca95
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
- run:
name: Prepare release
command: |
git config --global user.email "karis612@gmail.com"
git config --global user.name "Eunjae Lee"
git config --global user.email "instantsearch-bot@algolia.com"
git config --global user.name "Algolia"
yarn run release --yes --no-browse
shipjs_trigger:
<<: *defaults
Expand All @@ -70,7 +70,10 @@ jobs:
- save_cache: *save_yarn_cache
- run:
name: Triggering Ship.js to Release
command: yarn shipjs trigger
command: |
git config --global user.email "[email protected]"
git config --global user.name "Algolia"
yarn shipjs trigger
gh_pages:
<<: *defaults
steps:
Expand All @@ -82,8 +85,8 @@ jobs:
- run:
name: Release website to gh-pages
command: |
git config --global user.email "karis612@gmail.com"
git config --global user.name "Eunjae Lee"
git config --global user.email "instantsearch-bot@algolia.com"
git config --global user.name "Algolia"
yarn workspace website deploy:gh
workflows:
version: 2
Expand Down
5 changes: 4 additions & 1 deletion packages/shipjs/src/step/setup/CI/addCircleCIConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ jobs:
- save_cache: *save_yarn_cache
- run:
name: Triggering Ship.js to Release
command: yarn shipjs trigger
command: |
git config --global user.email "<%= gitUserEmail %>"
git config --global user.name "<%= gitUserName %>"
yarn shipjs trigger
workflows:
version: 2
release_if_needed:
Expand Down
5 changes: 4 additions & 1 deletion website/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ jobs:
command: yarn install
- run:
name: Triggering Ship.js to Release
command: yarn shipjs trigger
command: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
yarn shipjs trigger
workflows:
version: 2
release_if_needed:
Expand Down
2 changes: 1 addition & 1 deletion website/guide/useful-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ For example, you normally work on `develop` and want to have the latest release
```js
module.exports = {
afterPublish: ({ exec }) => {
exec(`git config --global user.email "your@email.com"`);
exec(`git config --global user.email "you@example.com"`);
exec(`git config --global user.name "Your Name"`);

exec('git checkout master');
Expand Down

0 comments on commit 1ecca95

Please sign in to comment.