Skip to content

Commit 4cde4c9

Browse files
committed
ci: add workflow to run wp plugin checks
1 parent f7cd455 commit 4cde4c9

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

.distignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/.git
33
/.github
44
/.wordpress-org
5+
/dist
56
/node_modules
67
/vendor
78

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Directories
22
/.github export-ignore
33
/.wordpress-org export-ignore
4+
/dist export-ignore
45
/node_modules export-ignore
56
/vendor export-ignore
67

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Plugin check
2+
on:
3+
push:
4+
branches: [ 'stable', 'release/*' ]
5+
pull_request:
6+
branches: [ 'stable' ]
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '8.2'
18+
tools: composer
19+
20+
- name: Build
21+
run: composer install --no-interaction
22+
23+
- name: Package plugin
24+
run: |
25+
mkdir -p ./dist
26+
rsync -rc --exclude-from=.distignore ./ ./dist/spcl --delete --delete-excluded
27+
28+
- name: Check WP plugin
29+
uses: wordpress/plugin-check-action@v1
30+
with:
31+
build-dir: ./dist/spcl

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/assets/js/*.min.js
2+
/dist
23
/node_modules
34
/vendor

0 commit comments

Comments
 (0)