diff --git a/.distignore b/.distignore index f1f3fee..e6e6faa 100644 --- a/.distignore +++ b/.distignore @@ -5,6 +5,7 @@ /.wordpress-org /bin /coverage +/dist /node_modules /tests /vendor diff --git a/.gitattributes b/.gitattributes index 7066f37..e0ce107 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,6 +18,7 @@ /.stylelintrc.json export-ignore /composer.json export-ignore /composer-php5.json export-ignore +/dist export-ignore /package.json export-ignore /package-lock.json export-ignore /composer.lock export-ignore diff --git a/.github/workflows/wordpress-plugin-check.yml b/.github/workflows/wordpress-plugin-check.yml new file mode 100644 index 0000000..50f356d --- /dev/null +++ b/.github/workflows/wordpress-plugin-check.yml @@ -0,0 +1,31 @@ +name: Plugin check +on: + push: + branches: [ 'stable', 'release/*', 'backport' ] + 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/statify --delete --delete-excluded + + - name: Check WP plugin + uses: wordpress/plugin-check-action@v1 + with: + build-dir: ./dist/statify diff --git a/.gitignore b/.gitignore index f7dad9c..8cdaf44 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .nyc_output composer.lock coverage +dist/ css/*.min.css js/*.min.js js/*.min.js.map