Skip to content

Commit 12fcbd9

Browse files
committed
Add PCP GitHub Action
1 parent c2254e5 commit 12fcbd9

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Diff for: .github/workflows/wordpress-plugin-check.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Plugin Check
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- develop
7+
release:
8+
types: [ published ]
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Composer install
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: latest
21+
coverage: none
22+
tools: wp-cli
23+
24+
- name: Install latest version of dist-archive-command
25+
run: wp package install wp-cli/dist-archive-command:@stable
26+
27+
- name: Build plugin
28+
run: |
29+
wp dist-archive . ./${{ github.event.repository.name }}.zip
30+
mkdir tmp-build
31+
unzip ${{ github.event.repository.name }}.zip -d tmp-build
32+
33+
- name: Run plugin check
34+
uses: wordpress/plugin-check-action@v1
35+
with:
36+
build-dir: ./tmp-build/${{ github.event.repository.name }}

0 commit comments

Comments
 (0)