Skip to content

v3.7.0

v3.7.0 #21

name: Test and Deploy
on:
push:
tags:
- '*'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: '7.4'
wp: WordPress
- php: '7.4'
wp: WordPress#6.6.2
- php: '7.4'
wp: WordPress#6.5.5
- php: '8.0'
wp: WordPress
- php: '8.0'
wp: WordPress#6.6.2
- php: '8.0'
wp: WordPress#6.5.5
- php: '8.2'
wp: WordPress
- php: '8.2'
wp: WordPress#6.6.2
- php: '8.2'
wp: WordPress#6.5.5
- php: '8.3'
wp: WordPress
- php: '8.3'
wp: WordPress#6.6.2
- php: '8.3'
wp: WordPress#6.5.5
name: PHP ${{ matrix.php }} / ${{ matrix.wp }} Test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use desired version of Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Npm install and build
run: |
npm ci
npm run build
- name: Composer install and set phpcs
run: |
composer install
composer phpcs
- name: Running lint check
run: npm run lint
- name: Install Playwright dependencies
run: npx playwright install chromium firefox webkit --with-deps
- name: Install WordPress
run: |
WP_ENV_CORE=WordPress/${{ matrix.wp }} WP_ENV_PHP_VERSION=${{ matrix.php }} npm run wp-env start
npm run wp-env run cli wp core version
npm run wp-env run cli wp cli info
- name: Running e2e tests
run: npm run test:e2e
deploy:
name: Deploy to WP.org
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use desired version of Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Npm install and build
run: |
npm ci
npm run build
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: custom-html-block-extension
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
commitish: main
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip