build-development-zip.yml (2341B)
1 name: Build development zip file 2 on: push 3 jobs: 4 build: 5 name: Build test, and zip 6 runs-on: ubuntu-latest 7 strategy: 8 fail-fast: false 9 matrix: 10 php: [8.0] 11 node-version: [14.x] 12 steps: 13 - name: Checkout code 14 uses: actions/checkout@v1 15 16 - name: Setup PHP 17 uses: shivammathur/setup-php@v2 18 with: 19 php-version: '${{ matrix.php }}' 20 tools: composer:v1 21 22 - name: Get Composer cache directory 23 id: composer-cache 24 run: | 25 echo "::set-output name=dir::$(composer config cache-files-dir)" 26 - name: Use Composer cache 27 uses: actions/cache@master 28 with: 29 path: ${{ steps['composer-cache'].outputs.dir }} 30 key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} 31 restore-keys: | 32 ${{ runner.os }}-composer- 33 - name: Build autoloader 34 run: composer install --prefer-dist --no-progress --no-suggest --no-dev 35 36 - name: Using Node version ${{ matrix.node-version }} 37 uses: actions/setup-node@v1 38 with: 39 node-version: ${{ matrix.node-version }} 40 - name: npm install, build, and test 41 run: | 42 npm ci 43 npm run dev 44 touch .devbuild 45 env: 46 CI: true 47 - name: Package 48 uses: actions/upload-artifact@v2 49 with: 50 name: extendify-sdk 51 retention-days: 5 52 path: | 53 ${{ github.workspace }}/ 54 !${{ github.workspace }}/node_modules/ 55 !${{ github.workspace }}/.github/ 56 !${{ github.workspace }}/.git/ 57 !${{ github.workspace }}/src/ 58 !${{ github.workspace }}/.editorconfig 59 !${{ github.workspace }}/.eslintrc.js 60 !${{ github.workspace }}/.eslintignore 61 !${{ github.workspace }}/.gitignore 62 !${{ github.workspace }}/.svgrrc 63 !${{ github.workspace }}/.prettierrc.js 64 !${{ github.workspace }}/.phpcs.xml.dist 65 !${{ github.workspace }}/webpack.config.js 66 !${{ github.workspace }}/composer.json 67 !${{ github.workspace }}/composer.lock 68 !${{ github.workspace }}/package.json 69 !${{ github.workspace }}/package-lock.json 70 !${{ github.workspace }}/readme.md