|
| 1 | +name: Release CLI Plugins (Beta) |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [v2-beta] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v4 |
| 12 | + - uses: pnpm/action-setup@v4 |
| 13 | + with: |
| 14 | + version: 7 |
| 15 | + - uses: actions/setup-node@v4 |
| 16 | + with: |
| 17 | + node-version: '22.x' |
| 18 | + |
| 19 | + - name: Enable Corepack |
| 20 | + run: corepack enable |
| 21 | + |
| 22 | + - name: Install pnpm |
| 23 | + run: corepack prepare pnpm@7 --activate |
| 24 | + |
| 25 | + - name: Install root dependencies |
| 26 | + run: pnpm install |
| 27 | + |
| 28 | + - name: Reading Configuration |
| 29 | + id: release_config |
| 30 | + uses: rgarcia-phi/[email protected] |
| 31 | + with: |
| 32 | + filename: .github/config/release.json |
| 33 | + prefix: release |
| 34 | + |
| 35 | + # 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 |
| 45 | + - name: Publishing dev dependencies (Beta) |
| 46 | + uses: JS-DevTools/npm-publish@v3 |
| 47 | + if: ${{ steps.dev-dependencies-installation.conclusion == 'success' }} |
| 48 | + with: |
| 49 | + token: ${{ secrets.NPM_TOKEN }} |
| 50 | + package: ./packages/contentstack-dev-dependencies/package.json |
| 51 | + tag: beta |
| 52 | + |
| 53 | + # 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 |
| 63 | + - name: Publishing utilities (Beta) |
| 64 | + uses: JS-DevTools/npm-publish@v3 |
| 65 | + if: ${{ steps.utilities-installation.conclusion == 'success' }} |
| 66 | + with: |
| 67 | + token: ${{ secrets.NPM_TOKEN }} |
| 68 | + package: ./packages/contentstack-utilities/package.json |
| 69 | + tag: beta |
| 70 | + |
| 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 | + |
| 90 | + # 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 |
| 100 | + - name: Publishing command (Beta) |
| 101 | + uses: JS-DevTools/npm-publish@v3 |
| 102 | + if: ${{ steps.command-installation.conclusion == 'success' }} |
| 103 | + with: |
| 104 | + token: ${{ secrets.NPM_TOKEN }} |
| 105 | + package: ./packages/contentstack-command/package.json |
| 106 | + tag: beta |
| 107 | + |
| 108 | + # 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 |
| 118 | + - name: Publishing config (Beta) |
| 119 | + uses: JS-DevTools/npm-publish@v3 |
| 120 | + if: ${{ steps.config-installation.conclusion == 'success' }} |
| 121 | + with: |
| 122 | + token: ${{ secrets.NPM_TOKEN }} |
| 123 | + package: ./packages/contentstack-config/package.json |
| 124 | + tag: beta |
| 125 | + |
| 126 | + # 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 |
| 136 | + - name: Publishing auth (Beta) |
| 137 | + uses: JS-DevTools/npm-publish@v3 |
| 138 | + if: ${{ steps.auth-installation.conclusion == 'success' }} |
| 139 | + with: |
| 140 | + token: ${{ secrets.NPM_TOKEN }} |
| 141 | + package: ./packages/contentstack-auth/package.json |
| 142 | + tag: beta |
| 143 | + |
| 144 | + # Export |
| 145 | + - name: Installing dependencies of export |
| 146 | + id: export-installation |
| 147 | + if: ${{ env.release_releaseAll == 'true' || env.release_plugins_export == 'true'}} |
| 148 | + working-directory: ./packages/contentstack-export |
| 149 | + run: npm install |
| 150 | + - name: Compiling export |
| 151 | + if: ${{ steps.export-installation.conclusion == 'success' }} |
| 152 | + working-directory: ./packages/contentstack-export |
| 153 | + run: npm run prepack |
| 154 | + - name: Publishing export (Beta) |
| 155 | + uses: JS-DevTools/npm-publish@v3 |
| 156 | + if: ${{ steps.export-installation.conclusion == 'success' }} |
| 157 | + with: |
| 158 | + token: ${{ secrets.NPM_TOKEN }} |
| 159 | + package: ./packages/contentstack-export/package.json |
| 160 | + tag: beta |
| 161 | + |
| 162 | + # Audit |
| 163 | + - name: Installing dependencies of audit |
| 164 | + id: audit-installation |
| 165 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_audit == 'true'}} |
| 166 | + working-directory: ./packages/contentstack-audit |
| 167 | + run: npm install |
| 168 | + - name: Compiling audit |
| 169 | + if: ${{ steps.audit-installation.conclusion == 'success' }} |
| 170 | + working-directory: ./packages/contentstack-audit |
| 171 | + run: npm run prepack |
| 172 | + - name: Publishing audit (Beta) |
| 173 | + uses: JS-DevTools/npm-publish@v3 |
| 174 | + if: ${{ steps.audit-installation.conclusion == 'success' }} |
| 175 | + with: |
| 176 | + token: ${{ secrets.NPM_TOKEN }} |
| 177 | + package: ./packages/contentstack-audit/package.json |
| 178 | + access: public |
| 179 | + tag: beta |
| 180 | + |
| 181 | + # Import |
| 182 | + - name: Installing dependencies of import |
| 183 | + id: import-installation |
| 184 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_import == 'true'}} |
| 185 | + working-directory: ./packages/contentstack-import |
| 186 | + run: npm install |
| 187 | + - name: Compiling import |
| 188 | + if: ${{ steps.import-installation.conclusion == 'success' }} |
| 189 | + working-directory: ./packages/contentstack-import |
| 190 | + run: npm run prepack |
| 191 | + - name: Publishing import (Beta) |
| 192 | + uses: JS-DevTools/npm-publish@v3 |
| 193 | + if: ${{ steps.import-installation.conclusion == 'success' }} |
| 194 | + with: |
| 195 | + token: ${{ secrets.NPM_TOKEN }} |
| 196 | + package: ./packages/contentstack-import/package.json |
| 197 | + tag: beta |
| 198 | + |
| 199 | + # Clone |
| 200 | + - name: Installing dependencies of clone |
| 201 | + id: clone-installation |
| 202 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_clone == 'true'}} |
| 203 | + working-directory: ./packages/contentstack-clone |
| 204 | + run: npm install |
| 205 | + - name: Publishing clone (Beta) |
| 206 | + uses: JS-DevTools/npm-publish@v3 |
| 207 | + if: ${{ steps.clone-installation.conclusion == 'success' }} |
| 208 | + with: |
| 209 | + token: ${{ secrets.NPM_TOKEN }} |
| 210 | + package: ./packages/contentstack-clone/package.json |
| 211 | + tag: beta |
| 212 | + |
| 213 | + # Import Setup |
| 214 | + - name: Installing dependencies of import-setup |
| 215 | + id: import-setup-installation |
| 216 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_import_setup == 'true'}} |
| 217 | + working-directory: ./packages/contentstack-import-setup |
| 218 | + run: npm install |
| 219 | + - name: Compiling import-setup |
| 220 | + if: ${{ steps.import-setup-installation.conclusion == 'success' }} |
| 221 | + working-directory: ./packages/contentstack-import-setup |
| 222 | + run: npm run prepack |
| 223 | + - name: Publishing import-setup (Beta) |
| 224 | + uses: JS-DevTools/npm-publish@v3 |
| 225 | + if: ${{ steps.import-setup-installation.conclusion == 'success' }} |
| 226 | + with: |
| 227 | + token: ${{ secrets.NPM_TOKEN }} |
| 228 | + package: ./packages/contentstack-import-setup/package.json |
| 229 | + access: public |
| 230 | + tag: beta |
| 231 | + |
| 232 | + # Export to CSV |
| 233 | + - name: Installing dependencies of export to csv |
| 234 | + id: export-to-csv-installation |
| 235 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_export-to-csv == 'true'}} |
| 236 | + working-directory: ./packages/contentstack-export-to-csv |
| 237 | + run: npm install |
| 238 | + - name: Publishing export to csv (Beta) |
| 239 | + uses: JS-DevTools/npm-publish@v3 |
| 240 | + if: ${{ steps.export-to-csv-installation.conclusion == 'success' }} |
| 241 | + with: |
| 242 | + token: ${{ secrets.NPM_TOKEN }} |
| 243 | + package: ./packages/contentstack-export-to-csv/package.json |
| 244 | + tag: beta |
| 245 | + |
| 246 | + # Migrate RTE |
| 247 | + - name: Installing dependencies of migrate rte |
| 248 | + id: migrate-rte-installation |
| 249 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_migrate-rte == 'true'}} |
| 250 | + working-directory: ./packages/contentstack-migrate-rte |
| 251 | + run: npm install |
| 252 | + - name: Publishing migrate rte (Beta) |
| 253 | + uses: JS-DevTools/npm-publish@v3 |
| 254 | + if: ${{ steps.migrate-rte-installation.conclusion == 'success' }} |
| 255 | + with: |
| 256 | + token: ${{ secrets.NPM_TOKEN }} |
| 257 | + package: ./packages/contentstack-migrate-rte/package.json |
| 258 | + tag: beta |
| 259 | + |
| 260 | + # Migration |
| 261 | + - name: Installing dependencies of migration |
| 262 | + id: migration-installation |
| 263 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_migration == 'true'}} |
| 264 | + working-directory: ./packages/contentstack-migration |
| 265 | + run: npm install |
| 266 | + - name: Publishing migration (Beta) |
| 267 | + uses: JS-DevTools/npm-publish@v3 |
| 268 | + if: ${{ steps.migration-installation.conclusion == 'success' }} |
| 269 | + with: |
| 270 | + token: ${{ secrets.NPM_TOKEN }} |
| 271 | + package: ./packages/contentstack-migration/package.json |
| 272 | + tag: beta |
| 273 | + |
| 274 | + # Seed |
| 275 | + - name: Installing dependencies of seed |
| 276 | + id: seed-installation |
| 277 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_seed == 'true'}} |
| 278 | + working-directory: ./packages/contentstack-seed |
| 279 | + run: npm install |
| 280 | + - name: Compiling seed |
| 281 | + if: ${{ steps.seed-installation.conclusion == 'success' }} |
| 282 | + working-directory: ./packages/contentstack-seed |
| 283 | + run: npm run prepack |
| 284 | + - name: Publishing seed (Beta) |
| 285 | + uses: JS-DevTools/npm-publish@v3 |
| 286 | + if: ${{ steps.seed-installation.conclusion == 'success' }} |
| 287 | + with: |
| 288 | + token: ${{ secrets.NPM_TOKEN }} |
| 289 | + package: ./packages/contentstack-seed/package.json |
| 290 | + tag: beta |
| 291 | + |
| 292 | + # Bootstrap |
| 293 | + - name: Installing dependencies of bootstrap |
| 294 | + id: bootstrap-installation |
| 295 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_bootstrap == 'true'}} |
| 296 | + working-directory: ./packages/contentstack-bootstrap |
| 297 | + run: npm install |
| 298 | + - name: Compiling bootstrap |
| 299 | + if: ${{ steps.bootstrap-installation.conclusion == 'success' }} |
| 300 | + working-directory: ./packages/contentstack-bootstrap |
| 301 | + run: npm run prepack |
| 302 | + - name: Publishing bootstrap (Beta) |
| 303 | + uses: JS-DevTools/npm-publish@v3 |
| 304 | + if: ${{ steps.bootstrap-installation.conclusion == 'success' }} |
| 305 | + with: |
| 306 | + token: ${{ secrets.NPM_TOKEN }} |
| 307 | + package: ./packages/contentstack-bootstrap/package.json |
| 308 | + tag: beta |
| 309 | + |
| 310 | + # Bulk Publish |
| 311 | + - name: Installing dependencies of bulk publish |
| 312 | + id: bulk-publish-installation |
| 313 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_bulk-publish == 'true'}} |
| 314 | + working-directory: ./packages/contentstack-bulk-publish |
| 315 | + run: npm install |
| 316 | + - name: Publishing bulk publish (Beta) |
| 317 | + uses: JS-DevTools/npm-publish@v3 |
| 318 | + if: ${{ steps.bulk-publish-installation.conclusion == 'success' }} |
| 319 | + with: |
| 320 | + token: ${{ secrets.NPM_TOKEN }} |
| 321 | + package: ./packages/contentstack-bulk-publish/package.json |
| 322 | + tag: beta |
| 323 | + |
| 324 | + # Branches |
| 325 | + - name: Installing dependencies of branches |
| 326 | + id: branches-installation |
| 327 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_branches == 'true'}} |
| 328 | + working-directory: ./packages/contentstack-branches |
| 329 | + run: npm install |
| 330 | + - name: Compiling branches |
| 331 | + if: ${{ steps.branches-installation.conclusion == 'success' }} |
| 332 | + working-directory: ./packages/contentstack-branches |
| 333 | + run: npm run prepack |
| 334 | + - name: Publishing branches (Beta) |
| 335 | + uses: JS-DevTools/npm-publish@v3 |
| 336 | + if: ${{ steps.branches-installation.conclusion == 'success' }} |
| 337 | + with: |
| 338 | + token: ${{ secrets.NPM_TOKEN }} |
| 339 | + package: ./packages/contentstack-branches/package.json |
| 340 | + access: public |
| 341 | + tag: beta |
| 342 | + |
| 343 | + # Core CLI |
| 344 | + - name: Installing dependencies of core |
| 345 | + id: core-installation |
| 346 | + if: ${{env.release_releaseAll == 'true' || env.release_plugins_core == 'true'}} |
| 347 | + working-directory: ./packages/contentstack |
| 348 | + run: npm install |
| 349 | + - name: Compiling core |
| 350 | + if: ${{ steps.core-installation.conclusion == 'success' }} |
| 351 | + working-directory: ./packages/contentstack |
| 352 | + run: npm run prepack |
| 353 | + - name: Publishing core (Beta) |
| 354 | + id: publish-core |
| 355 | + uses: JS-DevTools/npm-publish@v3 |
| 356 | + if: ${{ steps.core-installation.conclusion == 'success' }} |
| 357 | + with: |
| 358 | + token: ${{ secrets.NPM_TOKEN }} |
| 359 | + package: ./packages/contentstack/package.json |
| 360 | + tag: beta |
| 361 | + |
| 362 | + - name: Create Beta Release |
| 363 | + if: ${{ steps.publish-core.conclusion == 'success' }} |
| 364 | + id: create_release |
| 365 | + env: |
| 366 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 367 | + VERSION: ${{ steps.publish-core.outputs.version }} |
| 368 | + run: gh release create v"$VERSION"-beta --title "Beta Release $VERSION" --generate-notes --prerelease |
0 commit comments