Skip to content

Commit 31f3419

Browse files
author
Mohammod Al Amin Ashik
committed
adds changesets and ci
1 parent ca105aa commit 31f3419

18 files changed

+977
-3299
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [
7+
[
8+
"@sitecore-marketplace-sdk/xmc",
9+
"@sitecore-marketplace-sdk/client",
10+
"@sitecore-marketplace-sdk/core"
11+
]
12+
],
13+
"access": "public",
14+
"baseBranch": "main",
15+
"updateInternalDependencies": "patch",
16+
"ignore": []
17+
}

.github/workflows/on-push-pull-request.yaml renamed to .github/workflows/ci.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
name: on-push-pull-request
1+
name: CI
22

33
on:
4+
push:
5+
branches:
6+
- main
47
pull_request:
5-
branches: [master]
8+
workflow_dispatch:
69

710
jobs:
811
unit-test:

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
schedule:
9+
- cron: "44 20 * * 3"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}=${{ github.head_ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: [javascript]
27+
28+
steps:
29+
- uses: actions/checkout@v4.2.2
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v3
33+
with:
34+
languages: ${{ matrix.language }}
35+
queries: +security-and-quality
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v3
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v3
42+
with:
43+
category: "/language:${{ matrix.language }}"

.github/workflows/on-push-master.yaml

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

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
issues: write
12+
packages: write
13+
pull-requests: write
14+
15+
concurrency: ${{ github.workflow }}-${{ github.ref }}
16+
17+
jobs:
18+
release:
19+
name: Release
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4.2.2
23+
24+
- uses: pnpm/action-setup@v4.1.0
25+
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 20.x
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Build
35+
run: pnpm build
36+
37+
- name: Create Release Pull Request
38+
uses: changesets/action@v1.4.10
39+
with:
40+
publish: pnpm run mkptool publish
41+
version: pnpm changeset version
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
NPM_CONFIG_PROVENANCE: true
45+
DISPATCH_REPO_OWNER: ${{ vars.DISPATCH_REPO_OWNER }}
46+
DISPATCH_REPO_NAME: ${{ vars.DISPATCH_REPO_NAME }}
47+
DISPATCH_APP_ID: ${{ secrets.DISPATCH_APP_ID }}
48+
DISPATCH_APP_PRIVATE_KEY: ${{ secrets.DISPATCH_APP_PRIVATE_KEY }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules
2+
dist/
3+
*.tsbuildinfo
24

35
# Ignore distribution files in SDK packages
46
packages/*/dist/
@@ -9,6 +11,9 @@ packages/*/dist/
911
# Ignore all files in the .vscode directory
1012
.vscode/*
1113

14+
# Turbo
15+
.turbo/
16+
1217
*.tsbuildinfo
1318
*.DS_Store
1419
*.tgz

package.json

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33
"version": "0.1.0",
44
"private": true,
55
"workspaces": [
6-
"packages/*"
6+
"packages/*",
7+
"scripts/mkptool"
78
],
89
"scripts": {
9-
"test": "lerna run test",
10-
"build": "lerna run build",
10+
"test": "turbo run test",
11+
"build": "turbo run build",
1112
"build:serial": "pnpm -r --stream build",
12-
"clean": "lerna run clean",
13-
"lint": "lerna run lint",
14-
"test:all": "lerna run test",
15-
"coverage": "lerna run coverage",
16-
"generate:module": "lerna run generate:module",
17-
"pack:client": "lerna exec --scope @sitecore-marketplace-sdk/client -- pnpm pack",
18-
"pack:core": "lerna exec --scope @sitecore-marketplace-sdk/core -- pnpm pack",
19-
"pack:xmc": "lerna exec --scope @sitecore-marketplace-sdk/xmc -- pnpm pack",
20-
"pack:all": "lerna exec -- pnpm pack",
13+
"clean": "turbo run clean",
14+
"lint": "turbo run lint",
15+
"test:all": "turbo run test",
16+
"coverage": "turbo run coverage",
17+
"generate:module": "turbo run generate:module",
18+
"pack:client": "turbo exec --scope @sitecore-marketplace-sdk/client -- pnpm pack",
19+
"pack:core": "turbo exec --scope @sitecore-marketplace-sdk/core -- pnpm pack",
20+
"pack:xmc": "turbo exec --scope @sitecore-marketplace-sdk/xmc -- pnpm pack",
21+
"pack:all": "turbo exec -- pnpm pack",
2122
"postinstall": "pnpm build:serial"
2223
},
2324
"author": {
@@ -27,12 +28,13 @@
2728
"description": "Marketplace SDK",
2829
"devDependencies": {
2930
"jest-environment-jsdom": "^29.0.0",
30-
"lerna": "^8.1.9",
31+
"turbo": "^2.5.0",
3132
"typescript": "^5.0.0"
3233
},
3334
"pnpm": {
3435
"overrides": {
3536
"esbuild@<=0.24.2": ">=0.25.0"
3637
}
37-
}
38+
},
39+
"packageManager": "pnpm@10.6.3"
3840
}

0 commit comments

Comments
 (0)