|
1 | 1 | name: Deploy to npm |
2 | 2 |
|
3 | 3 | on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - main |
4 | 7 | workflow_dispatch: |
5 | | - branches: [main] |
6 | | - push: |
7 | | - branches: [main] |
8 | 8 |
|
9 | 9 | permissions: |
10 | 10 | id-token: write |
@@ -275,35 +275,36 @@ jobs: |
275 | 275 | - name: Test - observable mode |
276 | 276 | run: OBSERVABLE_MODE=true DISABLE_PARALLEL_DEPLOY=true npx vitest --retry 1 test/terraform-basic.test.ts |
277 | 277 |
|
278 | | - # publish: |
279 | | - # needs: |
280 | | - # - test-cdk-basic |
281 | | - # - test-sls-basic |
282 | | - # - test-sls-esbuild-cjs |
283 | | - # - test-sls-esbuild-esm |
284 | | - # - test-sam-basic |
285 | | - # - test-terraform-basic |
286 | | - # runs-on: ubuntu-latest |
287 | | - # concurrency: |
288 | | - # group: publish |
289 | | - # steps: |
290 | | - # - uses: actions/checkout@v4 |
291 | | - # - name: Use Node.js |
292 | | - # uses: actions/setup-node@v4 |
293 | | - # with: |
294 | | - # node-version: "20" |
295 | | - # registry-url: "https://registry.npmjs.org" |
296 | | - # - name: Install dependencies |
297 | | - # run: npm ci |
298 | | - # - uses: actions/download-artifact@v4 |
299 | | - # with: |
300 | | - # name: dist |
301 | | - # path: dist |
302 | | - # - name: Semantic Release |
303 | | - # run: | |
304 | | - # npm whoami |
305 | | - # npx semantic-release |
306 | | - # env: |
307 | | - # GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }} |
308 | | - # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
309 | | - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 278 | + publish: |
| 279 | + needs: |
| 280 | + - test-cdk-basic |
| 281 | + - test-sls-basic |
| 282 | + - test-sls-esbuild-cjs |
| 283 | + - test-sls-esbuild-esm |
| 284 | + - test-sam-basic |
| 285 | + - test-terraform-basic |
| 286 | + if: github.event_name == 'workflow_dispatch' |
| 287 | + runs-on: ubuntu-latest |
| 288 | + concurrency: |
| 289 | + group: publish |
| 290 | + steps: |
| 291 | + - uses: actions/checkout@v4 |
| 292 | + - name: Use Node.js |
| 293 | + uses: actions/setup-node@v4 |
| 294 | + with: |
| 295 | + node-version: "20" |
| 296 | + registry-url: "https://registry.npmjs.org" |
| 297 | + - name: Install dependencies |
| 298 | + run: npm ci |
| 299 | + - uses: actions/download-artifact@v4 |
| 300 | + with: |
| 301 | + name: dist |
| 302 | + path: dist |
| 303 | + - name: Semantic Release |
| 304 | + run: | |
| 305 | + npm whoami |
| 306 | + npx semantic-release |
| 307 | + env: |
| 308 | + GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }} |
| 309 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 310 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments