diff --git a/.github/workflows/module-plugin-test.yml b/.github/workflows/module-plugin-test.yml index a672a19..6fcd049 100644 --- a/.github/workflows/module-plugin-test.yml +++ b/.github/workflows/module-plugin-test.yml @@ -129,8 +129,10 @@ jobs: run: | if [[ -f package.json ]] then + echo "Has package.json file" echo "hasPackageJson=true" >> $GITHUB_OUTPUT else + echo "Does not have package.json file" echo "hasPackageJson=false" >> $GITHUB_OUTPUT fi @@ -141,25 +143,27 @@ jobs: run: | if grep -wq '"build":' package.json; then + echo "Has build command" echo "hasBuildCommand=true" >> $GITHUB_OUTPUT else + echo "Does not have build command" echo "hasBuildCommand=false" >> $GITHUB_OUTPUT fi - name: Setup Registry for Module working-directory: ./vendor/${{ inputs.module-repo }} - if: ${{ steps.package.outputs.hasPackageJson != '' }} + if: ${{ steps.package.outputs.hasPackageJson }} run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc - name: NPM Install for Module if package.json exists working-directory: ./vendor/${{ inputs.module-repo }} - if: ${{ steps.package.outputs.hasPackageJson != '' }} + if: ${{ steps.package.outputs.hasPackageJson }} run: npm ci --legacy-peer-deps - name: Build Module if build command exists working-directory: ./vendor/${{ inputs.module-repo }} if: | - ${{ steps.build.outputs.hasBuildCommand != '' }} + ${{ steps.build.outputs.hasBuildCommand }} run: npm run build # step to sync js package files with build files