|
| 1 | +name: Release CLI Plugins (Production) |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + - uses: pnpm/action-setup@v4 |
| 14 | + with: |
| 15 | + version: 10.28.0 |
| 16 | + - uses: actions/setup-node@v4 |
| 17 | + with: |
| 18 | + node-version: '22.x' |
| 19 | + |
| 20 | + - name: Enable Corepack |
| 21 | + run: corepack enable |
| 22 | + |
| 23 | + - name: Install pnpm |
| 24 | + run: corepack prepare pnpm@10.28.0 --activate |
| 25 | + |
| 26 | + - name: Clean the repository |
| 27 | + run: pnpm run clean:all |
| 28 | + |
| 29 | + - name: Install root dependencies |
| 30 | + run: pnpm install --no-frozen-lockfile |
| 31 | + |
| 32 | + - name: Build all plugins |
| 33 | + run: pnpm -r --sort run build |
| 34 | + |
| 35 | + - name: Reading Configuration |
| 36 | + id: release_config |
| 37 | + uses: rgarcia-phi/json-to-variables@v1.1.0 |
| 38 | + with: |
| 39 | + filename: .github/config/release.json |
| 40 | + prefix: release |
| 41 | + |
| 42 | + # Asset Management |
| 43 | + - name: Publishing asset-management (Production) |
| 44 | + uses: JS-DevTools/npm-publish@v3 |
| 45 | + with: |
| 46 | + token: ${{ secrets.NPM_TOKEN }} |
| 47 | + package: ./packages/contentstack-asset-management/package.json |
| 48 | + access: public |
| 49 | + tag: latest |
| 50 | + |
| 51 | + # Variants |
| 52 | + - name: Publishing variants (Production) |
| 53 | + uses: JS-DevTools/npm-publish@v3 |
| 54 | + with: |
| 55 | + token: ${{ secrets.NPM_TOKEN }} |
| 56 | + package: ./packages/contentstack-variants/package.json |
| 57 | + tag: latest |
| 58 | + |
| 59 | + # Export |
| 60 | + - name: Publishing export (Production) |
| 61 | + uses: JS-DevTools/npm-publish@v3 |
| 62 | + with: |
| 63 | + token: ${{ secrets.NPM_TOKEN }} |
| 64 | + package: ./packages/contentstack-export/package.json |
| 65 | + tag: latest |
| 66 | + |
| 67 | + # Audit |
| 68 | + - name: Publishing audit (Production) |
| 69 | + uses: JS-DevTools/npm-publish@v3 |
| 70 | + with: |
| 71 | + token: ${{ secrets.NPM_TOKEN }} |
| 72 | + package: ./packages/contentstack-audit/package.json |
| 73 | + tag: latest |
| 74 | + |
| 75 | + # Import |
| 76 | + - name: Publishing import (Production) |
| 77 | + uses: JS-DevTools/npm-publish@v3 |
| 78 | + with: |
| 79 | + token: ${{ secrets.NPM_TOKEN }} |
| 80 | + package: ./packages/contentstack-import/package.json |
| 81 | + tag: latest |
| 82 | + |
| 83 | + # Clone |
| 84 | + - name: Publishing clone (Production) |
| 85 | + uses: JS-DevTools/npm-publish@v3 |
| 86 | + with: |
| 87 | + token: ${{ secrets.NPM_TOKEN }} |
| 88 | + package: ./packages/contentstack-clone/package.json |
| 89 | + tag: latest |
| 90 | + |
| 91 | + # Import Setup |
| 92 | + - name: Publishing import-setup (Production) |
| 93 | + uses: JS-DevTools/npm-publish@v3 |
| 94 | + with: |
| 95 | + token: ${{ secrets.NPM_TOKEN }} |
| 96 | + package: ./packages/contentstack-import-setup/package.json |
| 97 | + tag: latest |
| 98 | + |
| 99 | + # Export to CSV |
| 100 | + - name: Publishing export-to-csv (Production) |
| 101 | + uses: JS-DevTools/npm-publish@v3 |
| 102 | + with: |
| 103 | + token: ${{ secrets.NPM_TOKEN }} |
| 104 | + package: ./packages/contentstack-export-to-csv/package.json |
| 105 | + tag: latest |
| 106 | + |
| 107 | + # Migration |
| 108 | + - name: Publishing migration (Production) |
| 109 | + uses: JS-DevTools/npm-publish@v3 |
| 110 | + with: |
| 111 | + token: ${{ secrets.NPM_TOKEN }} |
| 112 | + package: ./packages/contentstack-migration/package.json |
| 113 | + tag: latest |
| 114 | + |
| 115 | + # Migrate RTE |
| 116 | + - name: Publishing migrate-rte (Production) |
| 117 | + uses: JS-DevTools/npm-publish@v3 |
| 118 | + with: |
| 119 | + token: ${{ secrets.NPM_TOKEN }} |
| 120 | + package: ./packages/contentstack-migrate-rte/package.json |
| 121 | + access: public |
| 122 | + tag: latest |
| 123 | + |
| 124 | + # Seed |
| 125 | + - name: Publishing seed (Production) |
| 126 | + uses: JS-DevTools/npm-publish@v3 |
| 127 | + with: |
| 128 | + token: ${{ secrets.NPM_TOKEN }} |
| 129 | + package: ./packages/contentstack-seed/package.json |
| 130 | + tag: latest |
| 131 | + |
| 132 | + # Bootstrap |
| 133 | + - name: Publishing bootstrap (Production) |
| 134 | + uses: JS-DevTools/npm-publish@v3 |
| 135 | + with: |
| 136 | + token: ${{ secrets.NPM_TOKEN }} |
| 137 | + package: ./packages/contentstack-bootstrap/package.json |
| 138 | + tag: latest |
| 139 | + |
| 140 | + # Branches |
| 141 | + - name: Publishing branches (Production) |
| 142 | + uses: JS-DevTools/npm-publish@v3 |
| 143 | + with: |
| 144 | + token: ${{ secrets.NPM_TOKEN }} |
| 145 | + package: ./packages/contentstack-branches/package.json |
| 146 | + tag: latest |
| 147 | + |
| 148 | + # Apps CLI |
| 149 | + - name: Publishing apps-cli (Production) |
| 150 | + uses: JS-DevTools/npm-publish@v3 |
| 151 | + with: |
| 152 | + token: ${{ secrets.NPM_TOKEN }} |
| 153 | + package: ./packages/contentstack-apps-cli/package.json |
| 154 | + tag: latest |
| 155 | + |
| 156 | + # Query Export |
| 157 | + - name: Publishing query-export (Production) |
| 158 | + uses: JS-DevTools/npm-publish@v3 |
| 159 | + with: |
| 160 | + token: ${{ secrets.NPM_TOKEN }} |
| 161 | + package: ./packages/contentstack-query-export/package.json |
| 162 | + tag: latest |
| 163 | + |
| 164 | + # Content Type |
| 165 | + - name: Publishing content-type (Production) |
| 166 | + uses: JS-DevTools/npm-publish@v3 |
| 167 | + with: |
| 168 | + token: ${{ secrets.NPM_TOKEN }} |
| 169 | + package: ./packages/contentstack-content-type/package.json |
| 170 | + tag: latest |
| 171 | + |
| 172 | + # Regex Validate |
| 173 | + - name: Publishing regex-validate (Production) |
| 174 | + uses: JS-DevTools/npm-publish@v3 |
| 175 | + with: |
| 176 | + token: ${{ secrets.NPM_TOKEN }} |
| 177 | + package: ./packages/contentstack-cli-cm-regex-validate/package.json |
| 178 | + access: public |
| 179 | + tag: latest |
| 180 | + |
| 181 | + # Tsgen |
| 182 | + - name: Publishing tsgen (Production) |
| 183 | + uses: JS-DevTools/npm-publish@v3 |
| 184 | + with: |
| 185 | + token: ${{ secrets.NPM_TOKEN }} |
| 186 | + package: ./packages/contentstack-cli-tsgen/package.json |
| 187 | + tag: latest |
| 188 | + |
| 189 | + # External Migrate |
| 190 | + - name: Publishing external-migrate (Production) |
| 191 | + uses: JS-DevTools/npm-publish@v3 |
| 192 | + with: |
| 193 | + token: ${{ secrets.NPM_TOKEN }} |
| 194 | + package: ./packages/contentstack-external-migrate/package.json |
| 195 | + access: public |
| 196 | + tag: latest |
| 197 | + |
| 198 | + # Bulk Operations |
| 199 | + - name: Publishing bulk-operations (Production) |
| 200 | + uses: JS-DevTools/npm-publish@v3 |
| 201 | + with: |
| 202 | + token: ${{ secrets.NPM_TOKEN }} |
| 203 | + package: ./packages/contentstack-bulk-operations/package.json |
| 204 | + access: public |
| 205 | + tag: latest |
0 commit comments