Skip to content
Merged
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
10 changes: 2 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [master]
branches: [user-onboarding-v20]
pull_request:
branches: [master]
branches: [user-onboarding-v20]

# This workflow contains a single job called "npm_audit"
jobs:
Expand All @@ -25,12 +25,6 @@ jobs:
- 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

Expand Down
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: npx lerna run test
35 changes: 17 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ name: Release [Manual]
on: workflow_dispatch
permissions:
contents: write
id-tokens: write
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'
registry-url: 'https://registry.npmjs.org'
always-auth: false # important for trusted publishing
- name: Configure CI Git User
run: |
git config --global user.name $CONFIG_USERNAME
Expand All @@ -27,21 +30,19 @@ jobs:
GITHUB_PAT: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
CONFIG_USERNAME: ${{ vars.RELEASE_COMMIT_USERNAME }}
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
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_USERNAME: ${{ vars.NPM_USERNAME }}
# - 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
# 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
- name: Stash Changes
Expand All @@ -50,8 +51,6 @@ jobs:
# "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 }}
# env:
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33 changes: 12 additions & 21 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
{
"packages": [
"packages/search/projects/search-lib",
"packages/search/projects/search-element"
],
"packages": [
"packages/user-onboarding/projects/user-onboarding-lib",
"packages/user-onboarding/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"
},
"publish": {
"conventionalCommits": true,
"message": "chore: publish release",
"allowBranch": "user-onboarding-v20",
"noPrivate": true,
"graphType": "all"
},
"run": {
"concurrency": 3,
"ignore": [
Expand All @@ -38,10 +33,6 @@
"yes": true
}
},
"ignoreChanges": [
"**/__fixtures__/**",
"**/__tests__/**",
"**/*.md"
],
"ignoreChanges": ["**/__fixtures__/**", "**/__tests__/**", "**/*.md"],
"version": "independent"
}
Loading