diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..d759c3f --- /dev/null +++ b/.distignore @@ -0,0 +1,10 @@ +.distignore +.editorconfig +.git +.gitignore +.github +.vscode +.wp-env.json +composer.json +composer.lock +wp-graphql-redirection.pot diff --git a/.github/workflows/release-plugin.yml b/.github/workflows/release-plugin.yml index df2caf3..add5294 100644 --- a/.github/workflows/release-plugin.yml +++ b/.github/workflows/release-plugin.yml @@ -58,3 +58,37 @@ jobs: prerelease: false files: | wp-graphql-redirection.zip + + deploy: + name: "Deploy to WordPress.org" + runs-on: ubuntu-latest + needs: release + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v3 + + # PHP Composer dependencies + - uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + env: + COMPOSER_TOKEN: ${{ github.token }} + - id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + - shell: bash + run: composer install --no-dev --prefer-dist --no-progress --optimize-autoloader + + - name: Deploy to WordPress.org Plugin Repository + uses: 10up/action-wordpress-plugin-deploy@2.3.0 + env: + SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }} + SLUG: wp-graphql-redirection