diff --git a/.distignore b/.distignore new file mode 100644 index 00000000..d5ee4a29 --- /dev/null +++ b/.distignore @@ -0,0 +1,29 @@ +# Directories +/.git +/.github +/.wordpress-org +/assets +/config +/node_modules +/tests +# DO NOT EXCLUDE /vendor + +# Files +.distignore +.editorconfig +.eslintignore +.eslintrc.json +.gitignore +CHANGELOG.md +CODE_OF_CONDUCT.md +composer.json +composer.lock +CONTRIBUTING.md +CREDITS.md +hookdoc-conf.json +LICENSE.md +package-lock.json +package.json +phpcs.xml +phpunit.xml +README.md diff --git a/.github/workflows/dotorg-asset-readme-update.yml b/.github/workflows/dotorg-asset-readme-update.yml new file mode 100644 index 00000000..f5c04eff --- /dev/null +++ b/.github/workflows/dotorg-asset-readme-update.yml @@ -0,0 +1,16 @@ +name: Plugin asset/readme update +on: + push: + branches: + - trunk +jobs: + trunk: + name: Push to trunk + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: WordPress.org plugin asset/readme update + uses: 10up/action-wordpress-plugin-asset-update@stable + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} \ No newline at end of file diff --git a/.github/workflows/dotorg-push-deploy.yml b/.github/workflows/dotorg-push-deploy.yml new file mode 100644 index 00000000..43ce9988 --- /dev/null +++ b/.github/workflows/dotorg-push-deploy.yml @@ -0,0 +1,38 @@ +name: Deploy to WordPress.org +on: + release: + types: [published] +jobs: + tag: + name: New release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: composer install + run: composer install --no-dev + - name: Build + run: | + npm install + npm run build + - name: WordPress Plugin Deploy + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true + env: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip + asset_name: ${{ github.event.repository.name }}.zip + asset_content_type: application/zip \ No newline at end of file