|
84 | 84 | - name: "Debug Scope Output"
|
85 | 85 | run: |
|
86 | 86 | echo "Scope is: ${{ steps.scope.outputs.scope }}"
|
87 |
| - echo "Widgets are: ${{ steps.scope.outputs.widgets }}" |
| 87 | + echo "Widgets or js actions are: ${{ steps.scope.outputs.widgets }}" |
88 | 88 | mendix-version:
|
89 | 89 | runs-on: ubuntu-22.04
|
90 | 90 | outputs:
|
@@ -197,28 +197,39 @@ jobs:
|
197 | 197 | run: yarn install --immutable
|
198 | 198 | - name: "Force rebuild resources"
|
199 | 199 | run: |
|
200 |
| - # Always build JS actions if needed |
| 200 | + # Build JS actions if needed |
201 | 201 | if [ "${{ github.event.inputs.workspace }}" = "js-actions" ] || \
|
202 | 202 | [ "${{ github.event.inputs.workspace }}" = "*-native" ] || \
|
203 | 203 | [ "${{ github.event_name }}" = "schedule" ]; then
|
204 | 204 | yarn workspace mobile-resources-native run build
|
205 | 205 | yarn workspace nanoflow-actions-native run build
|
206 | 206 | fi
|
207 |
| - # Build the rest as usual |
208 |
| - yarn workspaces foreach ${{ needs.scope.outputs.scope }} run build |
209 |
| - - name: "Unit test" |
210 |
| - run: yarn workspaces foreach ${{ needs.scope.outputs.scope }} run test |
211 |
| - - name: "Run build for development" |
212 |
| - run: | |
213 |
| - if [ "${{ github.event.inputs.workspace }}" = "js-actions" ] || \ |
| 207 | +
|
| 208 | + # Build widgets if needed (any specific widget, *-native, or nightly) |
| 209 | + if [ "${{ github.event.inputs.workspace }}" != "js-actions" ] || \ |
214 | 210 | [ "${{ github.event.inputs.workspace }}" = "*-native" ] || \
|
215 | 211 | [ "${{ github.event_name }}" = "schedule" ]; then
|
216 |
| - yarn workspace mobile-resources-native run build |
217 |
| - yarn workspace nanoflow-actions-native run build |
| 212 | + widgets=$(echo '${{ needs.scope.outputs.widgets }}' | jq -r '.[]') |
| 213 | + for w in $widgets; do |
| 214 | + # Skip JS actions if already built above |
| 215 | + if [ "$w" != "mobile-resources-native" ] && [ "$w" != "nanoflow-actions-native" ]; then |
| 216 | + yarn workspace $w run build |
| 217 | + fi |
| 218 | + done |
218 | 219 | fi
|
219 |
| - yarn workspaces foreach ${{ needs.scope.outputs.scope }} run build |
220 |
| - env: |
221 |
| - NODE_OPTIONS: --max_old_space_size=6144 |
| 220 | + - name: "Unit test" |
| 221 | + run: yarn workspaces foreach ${{ needs.scope.outputs.scope }} run test |
| 222 | + # - name: "Run build for development" |
| 223 | + # run: | |
| 224 | + # if [ "${{ github.event.inputs.workspace }}" = "js-actions" ] || \ |
| 225 | + # [ "${{ github.event.inputs.workspace }}" = "*-native" ] || \ |
| 226 | + # [ "${{ github.event_name }}" = "schedule" ]; then |
| 227 | + # yarn workspace mobile-resources-native run build |
| 228 | + # yarn workspace nanoflow-actions-native run build |
| 229 | + # fi |
| 230 | + # yarn workspaces foreach ${{ needs.scope.outputs.scope }} run build |
| 231 | + # env: |
| 232 | + # NODE_OPTIONS: --max_old_space_size=6144 |
222 | 233 | - name: "Upload JS actions resources artifact"
|
223 | 234 | if: ${{ github.event.inputs.workspace == 'js-actions' }}
|
224 | 235 | uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #v4
|
|
0 commit comments