Skip to content

Workflow file for this run

on:
release:
types: [published]
name: Deploy to WordPress.org
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Version From Tag
id: get_version
uses: actions-ecosystem/[email protected]
with:
semver_only: true
- name: Latest Version
id: latest_version
run: |
TAG=${{ steps.get_version.outputs.tag }}
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Composer Install
uses: php-actions/composer@v6
with:
working_dir: ./
dev: no
php_version: 7.4
- name: Build Base Plugin Assets
run: |
npm install && npm run build
rm -rf node_modules
- name: Build Blocks
run: |
cd ./blocks/
npm install && npm run build
rm -rf node_modules
- name: Clean Build Files/Folders
run: |
chmod +x ./.deployment/cleanup.sh
sh ./.deployment/cleanup.sh;
- name: WordPress Plugin Deploy
uses: 10up/[email protected]
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}