diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..38e4d6e --- /dev/null +++ b/.distignore @@ -0,0 +1,7 @@ +/.git +/.github +/.wordpress-org +.distignore +.gitattributes +phpcs.xml +readme.md \ No newline at end of file diff --git a/.github/workflows/publish-to-wordpres.org.yaml b/.github/workflows/publish-to-wordpres.org.yaml new file mode 100644 index 0000000..75088fb --- /dev/null +++ b/.github/workflows/publish-to-wordpres.org.yaml @@ -0,0 +1,57 @@ +name: Publish to WordPress.org + +on: + workflow_run: + workflows: + - Create auto release + types: + - completed + +env: + PLUGIN_SLUG: cryptopay-gateway-for-memberpress + +jobs: + deploy_to_wp_org: + permissions: write-all + name: WordPress.org Plugin Deploy + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@master + + - name: Get upload url & and release version + id: get_release_info + run: | + latest_release=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/${{ github.repository }}/releases/latest") + latest_release_id=$(echo "$latest_release" | jq -r '.id') + latest_release_version=$(echo "$latest_release" | jq -r '.tag_name') + + upload_url=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/json" \ + "https://api.github.com/repos/${{ github.repository }}/releases/${latest_release_id}" | jq -r '.upload_url') + + echo "UPLOAD_URL=$upload_url" >> $GITHUB_ENV + echo "RELEASE_ID=$latest_release_id" >> $GITHUB_ENV + echo "RELEASE_VERSION=$latest_release_version" >> $GITHUB_ENV + - name: WordPress Plugin Deploy + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true + env: + SVN_PASSWORD: ${{ secrets.WORDPRESS_ORG_PASSWORD }} + SVN_USERNAME: ${{ secrets.WORDPRESS_ORG_USERNAME }} + SLUG: ${{ env.PLUGIN_SLUG }} + VERSION: ${{ env.RELEASE_VERSION }} + + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ env.UPLOAD_URL }} + asset_path: ${{ steps.deploy.outputs.zip-path }} + asset_name: ${{ env.PLUGIN_SLUG }}.zip + asset_content_type: application/zip \ No newline at end of file diff --git a/.wordpress-org/banner-1544x500.png b/.wordpress-org/banner-1544x500.png new file mode 100644 index 0000000..d6ebee3 Binary files /dev/null and b/.wordpress-org/banner-1544x500.png differ diff --git a/.wordpress-org/banner-772x250.png b/.wordpress-org/banner-772x250.png new file mode 100644 index 0000000..7790df4 Binary files /dev/null and b/.wordpress-org/banner-772x250.png differ diff --git a/.wordpress-org/icon-128x128.png b/.wordpress-org/icon-128x128.png new file mode 100644 index 0000000..9a61fa9 Binary files /dev/null and b/.wordpress-org/icon-128x128.png differ diff --git a/.wordpress-org/icon-256x256.png b/.wordpress-org/icon-256x256.png new file mode 100644 index 0000000..04f880a Binary files /dev/null and b/.wordpress-org/icon-256x256.png differ diff --git a/.wordpress-org/screenshot-1.png b/.wordpress-org/screenshot-1.png new file mode 100644 index 0000000..ffe809d Binary files /dev/null and b/.wordpress-org/screenshot-1.png differ diff --git a/.wordpress-org/screenshot-2.png b/.wordpress-org/screenshot-2.png new file mode 100644 index 0000000..f566fc3 Binary files /dev/null and b/.wordpress-org/screenshot-2.png differ diff --git a/.wordpress-org/screenshot-3.png b/.wordpress-org/screenshot-3.png new file mode 100644 index 0000000..8a33716 Binary files /dev/null and b/.wordpress-org/screenshot-3.png differ