Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ jobs:
- run: node --version
- run: npm --version

- name: Install Chrome
uses: browser-actions/setup-chrome@v1

- name: Install Monorepo Deps
run: npm ci --ignore-scripts

- name: Install Lerna
run: npm i -g [email protected] --ignore-scripts

- name: Bootstrap Monorepo
run: lerna bootstrap --ignore-scripts

- name: Run Test Cases
run: npx lerna run test
run: npm run test --workspaces --if-present

- name: Run Lint Checks
run: npx lerna run lint
run: npm run lint --workspaces --if-present
8 changes: 1 addition & 7 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,5 @@ jobs:
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts

- name: Install Lerna
run: npm i -g [email protected] --ignore-scripts

- name: Bootstrap Monorepo
run: lerna bootstrap --ignore-scripts

- name: Run test
run: lerna run test
run: npm run test --workspaces --if-present
16 changes: 5 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# fetch-depth is necessary to get all tags
# otherwise lerna can't detect the changes and will end up bumping the versions for all packages
fetch-depth: 0
token: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Configure CI Git User
Expand All @@ -29,29 +29,23 @@ jobs:
CONFIG_EMAIL: ${{ vars.RELEASE_COMMIT_EMAIL }}
- name: Authenticate with Registry
run: |
echo "@${NPM_USERNAME}:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_USERNAME: ${{ vars.NPM_USERNAME }}

- name: Bootstrap
- name: Install Dependencies
run: |
npm ci --ignore-scripts
npm i -g [email protected] --ignore-scripts
lerna bootstrap --ignore-scripts
- name: Test
run: npx lerna run test
run: npm run test --workspaces --if-present
- name: Stash Changes
run: git stash
- name: Bump Versions
# "HUSKY=0" disables pre-commit-msg check (Needed in order to allow lerna perform the release commit)
run: HUSKY=0 npx lerna version --yes --ci --conventional-commits
- name: Publish to NPM 🚀
# To always compare changes from registry
# using `from-package` compares version in local package.json with registry and publish it if required.
run: npx lerna publish from-package --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 2 additions & 14 deletions lerna.json
Copy link
Contributor

Choose a reason for hiding this comment

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

this is for user-onboarding ---- change the packages property

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
{
"packages": [
"packages/search/projects/search-lib",
"packages/search/projects/search-element"
"packages/search/projects/user-onboarding-lib",
"packages/search/projects/user-onboarding-element"
],
"command": {
"bootstrap": {
"concurrency": 4,
"ignore": [
"@sourceloop/chat-notif-example_ui",
"@sourceloop/search-client-example",
"@sourceloop/payment-example-frontend",
"@sourceloop/user-onboarding-example",
"@sourceloop/chat-notif-example-ui-socket",
"@sourceloop/oauth-example-ui",
"@sourceloop/ai-assistant-example"
]
},
"version": {
"conventionalCommits": true,
"message": "chore(release): publish"
Expand Down
Loading