-
Notifications
You must be signed in to change notification settings - Fork 30
48 lines (40 loc) · 1.18 KB
/
wordpress-org-plugin-guidelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: 'WordPress.org plugin directory guidelines'
on: # rebuild any PRs and main branch changes
workflow_dispatch:
pull_request:
push:
branches:
- main
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'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build plugin
run: |
npm run build
wp dist-archive . ./gatherpress.zip
mkdir tmp-build
unzip gatherpress.zip -d tmp-build
- name: Run plugin check
uses: swissspidy/wp-plugin-check-action@main
with:
build-dir: './tmp-build/gatherpress'
wp-version: 'trunk'