Skip to content

3.17.1-alpha1

3.17.1-alpha1 #207

Workflow file for this run

on:
release:
types:
- published
name: Deploy Rocket Plugin
jobs:
deploy:
name: Deploy Rocket Plugin
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: composer:v2
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Download zip
run: |
wget -O base.zip "https://github.com/wp-media/wp-rocket/archive/${{ github.event.release.target_commitish }}.zip"
unzip base.zip
mv wp-rocket-* wp-rocket
working-directory: /tmp
- name: Remove unmet dependencies by legacy versions
run: composer remove --dev --update-no-dev --no-scripts coenjacobs/mozart
working-directory: /tmp/wp-rocket
- name: Run composer
run: composer install --no-scripts --no-dev
working-directory: /tmp/wp-rocket
- name: Remove composer installers
run: composer remove composer/installers --update-no-dev --no-scripts
working-directory: /tmp/wp-rocket
- name: Optimize autoloader
run: composer dumpautoload -o
working-directory: /tmp/wp-rocket
- name: Zip Folder
run: zip -r __wp-rocket_${GITHUB_REF##*v}.zip wp-rocket
working-directory: /tmp
- name: Upload Zip
run: |
curl -v -X POST \
-H "Content-Type: multipart/form-data" \
-F "file=@/tmp/__wp-rocket_${GITHUB_REF##*v}.zip;type=application/zip" \
-H "Authorization: Bearer ${{ secrets.UPLOAD_ZIP_TOKEN }}" \
${{ secrets.UPLOAD_ZIP_URL }}