Skip to content

WordPress.org plugin directory guidelines #49

WordPress.org plugin directory guidelines

WordPress.org plugin directory guidelines #49

name: 'WordPress.org plugin directory guidelines'
on:
release:
types: [published]
jobs:
wp-org-plugin-guidelines:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: latest
coverage: none
tools: wp-cli
- name: Install latest version of dist-archive-command
run: wp package install wp-cli/dist-archive-command:dev-main
- name: Setup Node
uses: actions/setup-node@v4
with:
# Make sure to use the same version like WordPress/gutenberg.
# node-version-file: '.nvmrc'
node-version: v20.11.1
cache: npm
- name: Install dependencies
run: npm ci
- name: Build plugin
run: |
npm run build
wp dist-archive . ./label-printing.zip
mkdir tmp-build
unzip label-printing.zip -d tmp-build
- name: Run plugin check
uses: swissspidy/wp-plugin-check-action@main
with:
build-dir: './tmp-build/label-printing'
wp-version: 'trunk'