@@ -2,31 +2,33 @@ name: Node PR Lint, Build and Test
22
33# This workflow handles three scenarios:
44#
5- # 1. Push to `dev/*` branches:
5+ # 1. Push to `next`, ` dev/*`, or `feature /*` branches:
66# - Runs `code-quality-and-tests` and `integration-tests`
7- # - Skips `build-and-package` to save time
7+ # - Skips `build-and-package` to save resources and focus on code quality
88#
9- # 2. Pull Requests to `main` ( or rel/*) :
9+ # 2. Pull Requests to `main` or `next` :
1010# - Runs all jobs: code checks, tests, and packaging
11- # - Used for full validation before merge
11+ # - Ensures complete validation including artifact generation before merge
1212#
13- # 3. Push to `main` or `rel/*` :
14- # - Runs full workflow (same as PRs)
13+ # 3. Push to `main`:
14+ # - Runs full workflow for release validation and artifact generation
1515
1616on :
1717 workflow_dispatch :
1818
1919 push :
2020 branches :
2121 - main
22- - rel/*
22+ - next
2323 - dev/*
24+ - feature/*
2425
2526 pull_request :
2627 branches :
2728 - main
28- - rel/*
29+ - next
2930 - dev/*
31+ - feature/*
3032
3133concurrency :
3234 group : ${{ github.head_ref || github.run_id }}
@@ -102,14 +104,19 @@ jobs:
102104 - name : 🔄 Run Integration Tests (Headless UI)
103105 run : xvfb-run -a npm test
104106
105- # Run only on push to `main` or for any PR ( to any branch)
106- # Skip on direct pushes to `dev/*` branches
107+ # Run only on push to `main` or for PRs to main or next
108+ # Skip on direct pushes to `next`, ` dev/*`, and `feature /*` branches
107109 build-and-package :
108110 name : Build & Package Artifacts
109111 runs-on : ubuntu-latest
110112 needs : [code-quality-and-tests, integration-tests]
111113
112- if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/pull/')
114+ if : |
115+ github.ref == 'refs/heads/main' ||
116+ (startsWith(github.ref, 'refs/pull/') && (
117+ github.base_ref == 'main' ||
118+ github.base_ref == 'next'
119+ ))
113120
114121 defaults :
115122 run :
0 commit comments