diff --git a/.distignore b/.distignore index f8f9485..c26db0f 100644 --- a/.distignore +++ b/.distignore @@ -2,6 +2,7 @@ /.git /.github /.wordpress-org +/dist /node_modules /tests /vendor diff --git a/.gitattributes b/.gitattributes index 36c7b35..0648e13 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ /.github export-ignore /.wordpress-org export-ignore /bin export-ignore +/dist export-ignore /node_modules export-ignore /tests export-ignore diff --git a/.github/workflows/wordpress-plugin-check.yml b/.github/workflows/wordpress-plugin-check.yml new file mode 100644 index 0000000..2b01401 --- /dev/null +++ b/.github/workflows/wordpress-plugin-check.yml @@ -0,0 +1,31 @@ +name: Plugin check +on: + push: + branches: [ 'stable', 'release/*' ] + pull_request: + branches: [ 'stable' ] +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: composer + + - name: Build + run: composer install --no-interaction + + - name: Package plugin + run: | + mkdir -p ./dist + rsync -rc --exclude-from=.distignore ./ ./dist/antivirus --delete --delete-excluded + + - name: Check WP plugin + uses: wordpress/plugin-check-action@v1 + with: + build-dir: ./dist/antivirus diff --git a/.gitignore b/.gitignore index c9fe77b..04735a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea/ css/*.min.css +dist/ js/*.min.js vendor/ node_modules/