|
40 | 40 | filename: ${{ env.APP_NAME }}/appinfo/info.xml |
41 | 41 | expression: "//info//dependencies//nextcloud/@min-version" |
42 | 42 |
|
| 43 | + - name: Read package.json node and npm engines version |
| 44 | + uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2 |
| 45 | + id: versions |
| 46 | + # Continue if no package.json |
| 47 | + continue-on-error: true |
| 48 | + with: |
| 49 | + path: ${{ env.APP_NAME }} |
| 50 | + fallbackNode: "^20" |
| 51 | + fallbackNpm: "^8" |
| 52 | + |
| 53 | + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} |
| 54 | + # Skip if no package.json |
| 55 | + if: ${{ steps.versions.outputs.nodeVersion }} |
| 56 | + uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 |
| 57 | + with: |
| 58 | + node-version: ${{ steps.versions.outputs.nodeVersion }} |
| 59 | + |
| 60 | + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} |
| 61 | + # Skip if no package.json |
| 62 | + if: ${{ steps.versions.outputs.npmVersion }} |
| 63 | + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" |
| 64 | + |
43 | 65 | - name: Set up php ${{ env.PHP_VERSION }} |
44 | 66 | uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 |
45 | 67 | with: |
|
60 | 82 | cd ${{ env.APP_NAME }} |
61 | 83 | composer install --no-dev |
62 | 84 |
|
| 85 | + - name: Build ${{ env.APP_NAME }} |
| 86 | + # Skip if no package.json |
| 87 | + if: ${{ steps.versions.outputs.nodeVersion }} |
| 88 | + run: | |
| 89 | + cd ${{ env.APP_NAME }} |
| 90 | + npm ci |
| 91 | + npm run build |
| 92 | +
|
63 | 93 | - name: Check Krankerl config |
64 | 94 | id: krankerl |
65 | 95 | uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 |
|
0 commit comments