diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8fb1f81 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Deploy to WordPress.org Repository + +on: + release: + types: [released] + +jobs: + deploy: + name: Deploy to WP.org + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + +# # Optional: If your plugin is using composer dependencies, we want to include them +# # WITHOUT the dev dependencies. +# - 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 + dry-run: true + env: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + + # After the deploy, we also want to create a zip and upload it to the release on GitHub. We don't want + # users to have to go to the repository to find our plugin :). + - name: Upload release asset + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: ${{ github.workspace }}/${{ github.event.repository.name }}.zip