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
0 commit comments