Skip to content

Commit bc1ae4e

Browse files
committed
ci: add workflow to run wp plugin checks
1 parent 413b423 commit bc1ae4e

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.distignore

Lines changed: 1 addition & 0 deletions
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

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

0 commit comments

Comments
 (0)