Skip to content

Commit 3f6bf60

Browse files
Merge branch 'v2-beta' into fix/dx-4465-upgrade-chalk-to-v5
2 parents d12b5c0 + 258171c commit 3f6bf60

File tree

12 files changed

+208
-255
lines changed

12 files changed

+208
-255
lines changed
Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: Release CLI Core (v2 Beta)
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [v2-beta]
7+
paths:
8+
- 'packages/contentstack/package.json'
69

710
jobs:
811
build:
@@ -11,7 +14,7 @@ jobs:
1114
- uses: actions/checkout@v4
1215
- uses: pnpm/action-setup@v4
1316
with:
14-
version: 7
17+
version: 10.28.0
1518
- uses: actions/setup-node@v4
1619
with:
1720
node-version: '22.x'
@@ -20,10 +23,10 @@ jobs:
2023
run: corepack enable
2124

2225
- name: Install pnpm
23-
run: corepack prepare pnpm@7 --activate
26+
run: corepack prepare pnpm@10.28.0 --activate
2427

25-
- name: Install root dependencies
26-
run: pnpm install
28+
- name: Clean the repository
29+
run: pnpm run clean:all
2730

2831
- name: Reading Configuration
2932
id: release_config
@@ -33,38 +36,34 @@ jobs:
3336
prefix: release
3437

3538
# Core CLI
36-
- name: Installing dependencies of core
39+
- name: Install all dependencies
3740
id: core-installation
3841
if: ${{env.release_releaseAll == 'true' || env.release_plugins_core == 'true'}}
39-
working-directory: ./packages/contentstack
40-
run: npm install
41-
- name: Compiling core
42-
if: ${{ steps.core-installation.conclusion == 'success' }}
43-
working-directory: ./packages/contentstack
44-
run: npm run prepack
42+
run: pnpm install --frozen-lockfile
43+
44+
- name: Build all packages
45+
run: pnpm -r --concurrency 1 run build
46+
4547
- name: Publishing core (Beta)
4648
id: publish-core
4749
uses: JS-DevTools/npm-publish@v3
48-
if: ${{ steps.core-installation.conclusion == 'success' }}
4950
with:
5051
token: ${{ secrets.NPM_TOKEN }}
5152
package: ./packages/contentstack/package.json
5253
tag: beta
5354

5455
- name: Create Core Beta Release
55-
if: ${{ steps.publish-core.conclusion == 'success' }}
5656
id: create_release
5757
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
VERSION: ${{ steps.publish-core.outputs.version }}
6060
run: |
61-
# Look for the last release specifically starting with the 'core@v' prefix
62-
PREVIOUS_BETA=$(gh release list --limit 50 | grep 'core@v' | grep 'beta' | head -1 | cut -f1)
63-
64-
if [ -n "$PREVIOUS_BETA" ]; then
65-
# Compare current core version against previous core version
66-
gh release create "core@v$VERSION" --title "Core Beta $VERSION" --notes-from-tag "$PREVIOUS_BETA" --prerelease
61+
TAG="core@v${VERSION}"
62+
if gh release view "$TAG" &>/dev/null; then
63+
echo "Release $TAG already exists — skipping."
6764
else
68-
# Fallback if this is the first core@v release
69-
gh release create "core@v$VERSION" --title "Core Beta $VERSION" --generate-notes --prerelease
65+
gh release create "$TAG" \
66+
--title "Core Beta $VERSION" \
67+
--generate-notes \
68+
--prerelease
7069
fi

.github/workflows/release-v2-beta-platform-plugins.yml

Lines changed: 9 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- uses: pnpm/action-setup@v4
1313
with:
14-
version: 7
14+
version: 10.28.0
1515
- uses: actions/setup-node@v4
1616
with:
1717
node-version: '22.x'
@@ -20,10 +20,16 @@ jobs:
2020
run: corepack enable
2121

2222
- name: Install pnpm
23-
run: corepack prepare pnpm@7 --activate
23+
run: corepack prepare pnpm@10.28.0 --activate
24+
25+
- name: Clean the repository
26+
run: pnpm run clean:all
2427

2528
- name: Install root dependencies
26-
run: pnpm install
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Build all plugins
32+
run: pnpm -r --sort run build
2733

2834
- name: Reading Configuration
2935
id: release_config
@@ -33,128 +39,41 @@ jobs:
3339
prefix: release
3440

3541
# Dev Dependencies
36-
- name: Installing dependencies of dev dependencies
37-
id: dev-dependencies-installation
38-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_dev-dependencies == 'true'}}
39-
working-directory: ./packages/contentstack-dev-dependencies
40-
run: npm install
41-
- name: Compiling dev dependencies
42-
if: ${{ steps.dev-dependencies-installation.conclusion == 'success' }}
43-
working-directory: ./packages/contentstack-dev-dependencies
44-
run: npm run prepack
4542
- name: Publishing dev dependencies (Beta)
4643
uses: JS-DevTools/npm-publish@v3
47-
if: ${{ steps.dev-dependencies-installation.conclusion == 'success' }}
4844
with:
4945
token: ${{ secrets.NPM_TOKEN }}
5046
package: ./packages/contentstack-dev-dependencies/package.json
5147
tag: beta
5248

5349
# Utilities
54-
- name: Installing dependencies of utilities
55-
id: utilities-installation
56-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_utilities == 'true'}}
57-
working-directory: ./packages/contentstack-utilities
58-
run: npm install
59-
- name: Compiling utilities
60-
if: ${{ steps.utilities-installation.conclusion == 'success' }}
61-
working-directory: ./packages/contentstack-utilities
62-
run: npm run prepack
6350
- name: Publishing utilities (Beta)
6451
uses: JS-DevTools/npm-publish@v3
65-
if: ${{ steps.utilities-installation.conclusion == 'success' }}
6652
with:
6753
token: ${{ secrets.NPM_TOKEN }}
6854
package: ./packages/contentstack-utilities/package.json
6955
tag: beta
7056

71-
# Variants
72-
- name: Installing dependencies of variants
73-
id: variants-installation
74-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_utilities == 'true'}}
75-
working-directory: ./packages/contentstack-variants
76-
run: npm install
77-
- name: Compiling variants
78-
if: ${{ steps.variants-installation.conclusion == 'success' }}
79-
working-directory: ./packages/contentstack-variants
80-
run: npm run prepack
81-
- name: Publishing variants (Beta)
82-
uses: JS-DevTools/npm-publish@v3
83-
if: ${{ steps.variants-installation.conclusion == 'success' }}
84-
with:
85-
token: ${{ secrets.NPM_TOKEN }}
86-
package: ./packages/contentstack-variants/package.json
87-
access: public
88-
tag: beta
89-
9057
# Command
91-
- name: Installing dependencies of command
92-
id: command-installation
93-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_command == 'true'}}
94-
working-directory: ./packages/contentstack-command
95-
run: npm install
96-
- name: Compiling command
97-
if: ${{ steps.command-installation.conclusion == 'success' }}
98-
working-directory: ./packages/contentstack-command
99-
run: npm run prepack
10058
- name: Publishing command (Beta)
10159
uses: JS-DevTools/npm-publish@v3
102-
if: ${{ steps.command-installation.conclusion == 'success' }}
10360
with:
10461
token: ${{ secrets.NPM_TOKEN }}
10562
package: ./packages/contentstack-command/package.json
10663
tag: beta
10764

10865
# Config
109-
- name: Installing dependencies of config
110-
id: config-installation
111-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_config == 'true'}}
112-
working-directory: ./packages/contentstack-config
113-
run: npm install
114-
- name: Compiling config
115-
if: ${{ steps.config-installation.conclusion == 'success' }}
116-
working-directory: ./packages/contentstack-config
117-
run: npm run prepack
11866
- name: Publishing config (Beta)
11967
uses: JS-DevTools/npm-publish@v3
120-
if: ${{ steps.config-installation.conclusion == 'success' }}
12168
with:
12269
token: ${{ secrets.NPM_TOKEN }}
12370
package: ./packages/contentstack-config/package.json
12471
tag: beta
12572

12673
# Auth
127-
- name: Installing dependencies of auth
128-
id: auth-installation
129-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_auth == 'true'}}
130-
working-directory: ./packages/contentstack-auth
131-
run: npm install
132-
- name: Compiling auth
133-
if: ${{ steps.auth-installation.conclusion == 'success' }}
134-
working-directory: ./packages/contentstack-auth
135-
run: npm run prepack
13674
- name: Publishing auth (Beta)
13775
uses: JS-DevTools/npm-publish@v3
138-
if: ${{ steps.auth-installation.conclusion == 'success' }}
13976
with:
14077
token: ${{ secrets.NPM_TOKEN }}
14178
package: ./packages/contentstack-auth/package.json
14279
tag: beta
143-
144-
- name: Create Platform Plugins Beta Release
145-
# Adjust the ID below to match your actual publishing step ID for plugins
146-
if: ${{ steps.publish-plugins.conclusion == 'success' }}
147-
id: create_release_plugins
148-
env:
149-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
150-
# Extract version from the output of your plugin publish step
151-
VERSION: ${{ steps.publish-plugins.outputs.version }}
152-
run: |
153-
# Look for the last release specifically starting with 'plugins@v'
154-
PREVIOUS_BETA=$(gh release list --limit 50 | grep 'platform-plugins@v' | grep 'beta' | head -1 | cut -f1)
155-
156-
if [ -n "$PREVIOUS_BETA" ]; then
157-
gh release create "platform-plugins@v$VERSION" --title "Platform Plugins Beta $VERSION" --notes-from-tag "$PREVIOUS_BETA" --prerelease
158-
else
159-
gh release create "platform-plugins@v$VERSION" --title "Platform Plugins Beta $VERSION" --generate-notes --prerelease
160-
fi

.github/workflows/unit-test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ jobs:
2222
node-version: '22.x'
2323
cache: 'pnpm' # optional but recommended
2424

25-
- name: Temporarily disable contentstack package
26-
run: mv packages/contentstack/package.json packages/contentstack/package.json.disabled || true
25+
# - name: Temporarily disable contentstack package
26+
# run: mv packages/contentstack/package.json packages/contentstack/package.json.disabled || true
2727

2828
- name: Install Dependencies (Excluding Contentstack)
29-
run: npm run bootstrap
29+
run: pnpm install --frozen-lockfile
3030

3131
- name: Build all plugins (Excluding Contentstack)
3232
run: |
33-
npm run build
33+
NODE_ENV=PREPACK_MODE pnpm -r --sort run build
3434
35-
- name: Restore contentstack package
36-
run: mv packages/contentstack/package.json.disabled packages/contentstack/package.json || true
35+
# - name: Restore contentstack package
36+
# run: mv packages/contentstack/package.json.disabled packages/contentstack/package.json || true
3737

3838
- name: Run tests for Contentstack Command
3939
working-directory: ./packages/contentstack-command
@@ -45,4 +45,4 @@ jobs:
4545

4646
- name: Run tests for Contentstack Auth
4747
working-directory: ./packages/contentstack-auth
48-
run: NODE_ENV=PREPACK_MODE npm run test
48+
run: NODE_ENV=PREPACK_MODE npm run test:unit

.talismanrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fileignoreconfig:
22
- filename: package-lock.json
3-
checksum: 45100667793fc7dfaae3e24787871257e7f29e06df69ba10ec05b358d59ff15d
3+
checksum: a76d549ee4cbf3da65907ccf49fd0f2e5027f39be8c7ac431e7e38c9b1b5df8e
44
- filename: pnpm-lock.yaml
5-
checksum: c07d7e30ff879a537391548110f18b5d7f7a517dc8de48b05018ca78130ee5fd
5+
checksum: adf3973977563fbc08ca18420b102616ea0573c5633067e0793c7ccbe1462cad
66
version: '1.0'

packages/contentstack-auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version)
21-
@contentstack/cli-auth/2.0.0-beta.4 darwin-arm64 node-v22.13.1
21+
@contentstack/cli-auth/2.0.0-beta.7 darwin-arm64 node-v22.13.1
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND

packages/contentstack-auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"scripts": {
8-
"build": "pnpm compile && oclif manifest",
8+
"build": "pnpm compile && oclif manifest && oclif readme",
99
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
1010
"compile": "tsc -b tsconfig.json",
1111
"postpack": "rm -f oclif.manifest.json",

packages/contentstack-config/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version)
21-
@contentstack/cli-config/2.0.0-beta.2 darwin-arm64 node-v22.13.1
21+
@contentstack/cli-config/2.0.0-beta.3 darwin-arm64 node-v22.13.1
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND

packages/contentstack-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.0.0-beta.3",
55
"author": "Contentstack",
66
"scripts": {
7-
"build": "pnpm compile && oclif manifest",
7+
"build": "pnpm compile && oclif manifest && oclif readme",
88
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
99
"compile": "tsc -b tsconfig.json",
1010
"postpack": "rm -f oclif.manifest.json",

packages/contentstack-dev-dependencies/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/cli-dev-dependencies",
3-
"version": "1.3.1",
3+
"version": "2.0.0-beta.0",
44
"description": "Customized dev dependencies for ContentStack projects",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

0 commit comments

Comments
 (0)