Skip to content

Commit c4aceb7

Browse files
committed
updated workflow
1 parent 621032c commit c4aceb7

13 files changed

Lines changed: 34 additions & 131 deletions

File tree

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

Lines changed: 9 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release CLI Plugins (Beta)
1+
name: Release CLI Plugins (v2 Beta)
22

33
on:
44
push:
@@ -22,8 +22,14 @@ jobs:
2222
- name: Install pnpm
2323
run: corepack prepare pnpm@10.28.0 --activate
2424

25+
- name: Clean the repository
26+
run: pnpm run clean:all
27+
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,200 +39,97 @@ jobs:
3339
prefix: release
3440

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

5449
# Export
55-
- name: Installing dependencies of export
56-
id: export-installation
57-
if: ${{ env.release_releaseAll == 'true' || env.release_plugins_export == 'true'}}
58-
working-directory: ./packages/contentstack-export
59-
run: npm install
60-
- name: Compiling export
61-
if: ${{ steps.export-installation.conclusion == 'success' }}
62-
working-directory: ./packages/contentstack-export
63-
run: npm run prepack
6450
- name: Publishing export (Beta)
6551
uses: JS-DevTools/npm-publish@v3
66-
if: ${{ steps.export-installation.conclusion == 'success' }}
6752
with:
6853
token: ${{ secrets.NPM_TOKEN }}
6954
package: ./packages/contentstack-export/package.json
7055
tag: beta
7156

7257
# Audit
73-
- name: Installing dependencies of audit
74-
id: audit-installation
75-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_audit == 'true'}}
76-
working-directory: ./packages/contentstack-audit
77-
run: npm install
78-
- name: Compiling audit
79-
if: ${{ steps.audit-installation.conclusion == 'success' }}
80-
working-directory: ./packages/contentstack-audit
81-
run: npm run prepack
8258
- name: Publishing audit (Beta)
8359
uses: JS-DevTools/npm-publish@v3
84-
if: ${{ steps.audit-installation.conclusion == 'success' }}
8560
with:
8661
token: ${{ secrets.NPM_TOKEN }}
8762
package: ./packages/contentstack-audit/package.json
88-
access: public
8963
tag: beta
9064

9165
# Import
92-
- name: Installing dependencies of import
93-
id: import-installation
94-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_import == 'true'}}
95-
working-directory: ./packages/contentstack-import
96-
run: npm install
97-
- name: Compiling import
98-
if: ${{ steps.import-installation.conclusion == 'success' }}
99-
working-directory: ./packages/contentstack-import
100-
run: npm run prepack
10166
- name: Publishing import (Beta)
10267
uses: JS-DevTools/npm-publish@v3
103-
if: ${{ steps.import-installation.conclusion == 'success' }}
10468
with:
10569
token: ${{ secrets.NPM_TOKEN }}
10670
package: ./packages/contentstack-import/package.json
10771
tag: beta
10872

10973
# Clone
110-
- name: Installing dependencies of clone
111-
id: clone-installation
112-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_clone == 'true'}}
113-
working-directory: ./packages/contentstack-clone
114-
run: npm install
11574
- name: Publishing clone (Beta)
11675
uses: JS-DevTools/npm-publish@v3
117-
if: ${{ steps.clone-installation.conclusion == 'success' }}
11876
with:
11977
token: ${{ secrets.NPM_TOKEN }}
12078
package: ./packages/contentstack-clone/package.json
12179
tag: beta
12280

12381
# Import Setup
124-
- name: Installing dependencies of import-setup
125-
id: import-setup-installation
126-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_import_setup == 'true'}}
127-
working-directory: ./packages/contentstack-import-setup
128-
run: npm install
129-
- name: Compiling import-setup
130-
if: ${{ steps.import-setup-installation.conclusion == 'success' }}
131-
working-directory: ./packages/contentstack-import-setup
132-
run: npm run prepack
13382
- name: Publishing import-setup (Beta)
13483
uses: JS-DevTools/npm-publish@v3
135-
if: ${{ steps.import-setup-installation.conclusion == 'success' }}
13684
with:
13785
token: ${{ secrets.NPM_TOKEN }}
13886
package: ./packages/contentstack-import-setup/package.json
139-
access: public
14087
tag: beta
14188

14289
# Export to CSV
143-
- name: Installing dependencies of export to csv
144-
id: export-to-csv-installation
145-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_export-to-csv == 'true'}}
146-
working-directory: ./packages/contentstack-export-to-csv
147-
run: npm install
14890
- name: Publishing export to csv (Beta)
14991
uses: JS-DevTools/npm-publish@v3
150-
if: ${{ steps.export-to-csv-installation.conclusion == 'success' }}
15192
with:
15293
token: ${{ secrets.NPM_TOKEN }}
15394
package: ./packages/contentstack-export-to-csv/package.json
15495
tag: beta
15596

15697
# Migration
157-
- name: Installing dependencies of migration
158-
id: migration-installation
159-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_migration == 'true'}}
160-
working-directory: ./packages/contentstack-migration
161-
run: npm install
16298
- name: Publishing migration (Beta)
16399
uses: JS-DevTools/npm-publish@v3
164-
if: ${{ steps.migration-installation.conclusion == 'success' }}
165100
with:
166101
token: ${{ secrets.NPM_TOKEN }}
167102
package: ./packages/contentstack-migration/package.json
168103
tag: beta
169104

170105
# Seed
171-
- name: Installing dependencies of seed
172-
id: seed-installation
173-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_seed == 'true'}}
174-
working-directory: ./packages/contentstack-seed
175-
run: npm install
176-
- name: Compiling seed
177-
if: ${{ steps.seed-installation.conclusion == 'success' }}
178-
working-directory: ./packages/contentstack-seed
179-
run: npm run prepack
180106
- name: Publishing seed (Beta)
181107
uses: JS-DevTools/npm-publish@v3
182-
if: ${{ steps.seed-installation.conclusion == 'success' }}
183108
with:
184109
token: ${{ secrets.NPM_TOKEN }}
185110
package: ./packages/contentstack-seed/package.json
186111
tag: beta
187112

188113
# Bootstrap
189-
- name: Installing dependencies of bootstrap
190-
id: bootstrap-installation
191-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_bootstrap == 'true'}}
192-
working-directory: ./packages/contentstack-bootstrap
193-
run: npm install
194-
- name: Compiling bootstrap
195-
if: ${{ steps.bootstrap-installation.conclusion == 'success' }}
196-
working-directory: ./packages/contentstack-bootstrap
197-
run: npm run prepack
198114
- name: Publishing bootstrap (Beta)
199115
uses: JS-DevTools/npm-publish@v3
200-
if: ${{ steps.bootstrap-installation.conclusion == 'success' }}
201116
with:
202117
token: ${{ secrets.NPM_TOKEN }}
203118
package: ./packages/contentstack-bootstrap/package.json
204119
tag: beta
205120

206121
# Branches
207-
- name: Installing dependencies of branches
208-
id: branches-installation
209-
if: ${{env.release_releaseAll == 'true' || env.release_plugins_branches == 'true'}}
210-
working-directory: ./packages/contentstack-branches
211-
run: npm install
212-
- name: Compiling branches
213-
if: ${{ steps.branches-installation.conclusion == 'success' }}
214-
working-directory: ./packages/contentstack-branches
215-
run: npm run prepack
216122
- name: Publishing branches (Beta)
217123
uses: JS-DevTools/npm-publish@v3
218-
if: ${{ steps.branches-installation.conclusion == 'success' }}
219124
with:
220125
token: ${{ secrets.NPM_TOKEN }}
221126
package: ./packages/contentstack-branches/package.json
222-
access: public
223127
tag: beta
224128

225129
- name: Create Beta Release
226-
if: ${{ steps.publish-core.conclusion == 'success' }}
227130
id: create_release
228131
env:
229-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }}
230133
VERSION: ${{ steps.publish-core.outputs.version }}
231134
run: |
232135
# Get the previous beta release for comparison

.talismanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fileignoreconfig:
22
- filename: pnpm-lock.yaml
3-
checksum: 69c9fefd1240e00e7efa17658a53292444de3eecc70fb93c719b3b92a8cac0f0
3+
checksum: 7b55d6b1e94fc2265b1c64193f820ba5e6d1c22096a651f9975a2cf5429397f4
44
- filename: .husky/pre-commit
55
checksum: 7a12030ddfea18d6f85edc25f1721fb2009df00fdd42bab66b05de25ab3e32b2
66
- filename: packages/contentstack-migration/src/commands/cm/stacks/migration.ts

packages/contentstack-audit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-audit/<%- commandPath %>"
6565
},
6666
"scripts": {
67-
"build": "pnpm compile && oclif manifest",
67+
"build": "pnpm compile && oclif manifest && oclif readme",
6868
"lint": "eslint . --ext .ts --config .eslintrc",
6969
"postpack": "shx rm -f oclif.manifest.json",
7070
"posttest": "npm run lint",

packages/contentstack-bootstrap/package.json

Lines changed: 2 additions & 2 deletions
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",
@@ -24,7 +24,7 @@
2424
"@oclif/plugin-help": "^6.2.37",
2525
"inquirer": "8.2.7",
2626
"mkdirp": "^1.0.4",
27-
"tar": "^7.5.7"
27+
"tar": "^7.5.10"
2828
},
2929
"devDependencies": {
3030
"@oclif/test": "^4.1.13",

packages/contentstack-branches/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"typescript": "^4.9.5"
3131
},
3232
"scripts": {
33-
"build": "pnpm compile && oclif manifest",
33+
"build": "pnpm compile && oclif manifest && oclif readme",
3434
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
3535
"compile": "tsc -b tsconfig.json",
3636
"postpack": "rm -f oclif.manifest.json",

packages/contentstack-clone/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
},
6262
"repository": "https://github.com/contentstack/cli",
6363
"scripts": {
64-
"build": "pnpm compile && oclif manifest",
64+
"build": "pnpm compile && oclif manifest && oclif readme",
6565
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
6666
"compile": "tsc -b tsconfig.json",
6767
"postpack": "rm -f oclif.manifest.json",

packages/contentstack-export-to-csv/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
},
6464
"repository": "https://github.com/contentstack/cli",
6565
"scripts": {
66-
"build": "pnpm compile && oclif manifest",
66+
"build": "pnpm compile && oclif manifest && oclif readme",
6767
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo oclif.manifest.json",
6868
"compile": "tsc -b tsconfig.json",
6969
"lint": "eslint src/**/*.ts",

packages/contentstack-export/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"typescript": "^4.9.5"
4747
},
4848
"scripts": {
49-
"build": "pnpm compile && oclif manifest",
49+
"build": "pnpm compile && oclif manifest && oclif readme",
5050
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
5151
"compile": "tsc -b tsconfig.json",
5252
"postpack": "rm -f oclif.manifest.json",

packages/contentstack-import-setup/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"typescript": "^4.9.5"
4343
},
4444
"scripts": {
45-
"build": "pnpm compile && oclif manifest",
45+
"build": "pnpm compile && oclif manifest && oclif readme",
4646
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
4747
"compile": "tsc -b tsconfig.json",
4848
"postpack": "rm -f oclif.manifest.json",

packages/contentstack-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"typescript": "^4.9.5"
4646
},
4747
"scripts": {
48-
"build": "pnpm compile && oclif manifest",
48+
"build": "pnpm compile && oclif manifest && oclif readme",
4949
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
5050
"compile": "tsc -b tsconfig.json",
5151
"postpack": "rm -f oclif.manifest.json",

0 commit comments

Comments
 (0)