Skip to content

Commit f0c3a40

Browse files
committed
ci: add workflow to run wp plugin checks
1 parent ec92bf4 commit f0c3a40

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
@@ -5,6 +5,7 @@
55
/.wordpress-org
66
/bin
77
/coverage
8+
/dist
89
/node_modules
910
/tests
1011
/vendor

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/.stylelintrc.json export-ignore
1919
/composer.json export-ignore
2020
/composer-php5.json export-ignore
21+
/dist export-ignore
2122
/package.json export-ignore
2223
/package-lock.json export-ignore
2324
/composer.lock export-ignore
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/statify --delete --delete-excluded
27+
28+
- name: Check WP plugin
29+
uses: wordpress/plugin-check-action@v1
30+
with:
31+
build-dir: ./dist/statify

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.nyc_output
44
composer.lock
55
coverage
6+
dist/
67
css/*.min.css
78
js/*.min.js
89
js/*.min.js.map

0 commit comments

Comments
 (0)