Skip to content

Add wp-org-svn-deploy reusable workflow (WordPress.org SVN deploy) - #60

Merged
andypotanin merged 4 commits into
masterfrom
feature/wp-org-svn-deploy
Sep 2, 2026
Merged

andypotanin merged 4 commits into
masterfrom
feature/wp-org-svn-deploy

Conversation

@andypotanin

@andypotanin andypotanin commented Sep 2, 2026

Copy link
Copy Markdown
Member

What

New reusable workflow wp-org-svn-deploy.yml: deploys a tagged plugin release to the WordPress.org Plugin Directory via SVN, wrapping 10up/action-wordpress-plugin-deploy SHA-pinned at 2.3.0 (54bd289b).

  • Inputs: tag (required; checked out and deployed as tags/<tag>/ + trunk/), slug (defaults to caller repo name), dry_run (validate without committing)
  • Secrets: svn_username / svn_password (required) — referenced only via secrets.*, never stored in any repo; org secrets are scoped to selected repositories
  • Docs + example + README index entries per repo convention

Why

wp-stateless 4.4.2 was deployed to wp.org manually over SVN; this makes it a one-dispatch (or fully chained) step for all UDX plugins. Caller wiring for wp-stateless's publish-release.yml follows in a separate PR.

Security notes

  • Workflow runs with permissions: contents: read; no write scopes
  • Third-party action pinned by full commit SHA
  • SVN credentials never appear in logs (GitHub masks org secrets)

Devin Review

Copilot AI balanced review requested due to automatic review settings September 2, 2026 17:01
Comment on lines +36 to +43
- name: Checkout release tag
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
ref: ${{ inputs.tag }}

# Deploys trunk/ + tags/<tag>/ and .wordpress-org/ assets via SVN.
# Refuses to commit when dry_run is true.
- name: Deploy to WordPress.org

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

Comment thread .github/workflows/wp-org-svn-deploy.yml Outdated
- name: Checkout release tag
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
ref: ${{ inputs.tag }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Colliding branch replaces release tag

When a branch and tag share a name, actions/checkout selects the branch. WordPress then receives branch contents under the tag’s version.

Suggested change
ref: ${{ inputs.tag }}
ref: refs/tags/${{ inputs.tag }}
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

SVN_USERNAME: ${{ secrets.svn_username }}
SVN_PASSWORD: ${{ secrets.svn_password }}
SLUG: ${{ inputs.slug }}
VERSION: ${{ inputs.tag }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Slashed release tags cannot deploy

When tag contains a slash, VERSION names a nested SVN path whose parent does not exist. Every such release fails before commit.

Prompt for agents
The reusable workflow accepts any Git tag string, but 10up/action-wordpress-plugin-deploy uses VERSION directly as the working-copy destination under tags/. A valid Git tag such as release/1.2.3 therefore requires an intermediate SVN directory that the action does not create, and svn cp fails. Decide whether this workflow must support slashed Git tags by mapping them to a valid WordPress version, or reject them explicitly before deployment and document the accepted tag format. Update .github/workflows/wp-org-svn-deploy.yml, its workflow documentation, and its example consistently.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread docs/workflows/wp-org-svn-deploy.md Outdated

- Deploys `trunk/` + `tags/<tag>/` to `plugins.svn.wordpress.org/<slug>/`
- Handles `.wordpress-org/` assets (banners, icons, screenshots) when present
- `dry_run` mode validates the full flow without committing to SVN

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Dry-run validation is overstated

dry_run never validates SVN credentials or commit permission. An existing version also bypasses package preparation, despite the promised full-flow validation.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Ref qualification and boolean input handling can currently cause incorrect deployment or workflow validation failure.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a reusable workflow for deploying tagged WordPress plugins to WordPress.org SVN.

Changes:

  • Adds SHA-pinned checkout and SVN deployment automation.
  • Supports configurable tags, slugs, dry runs, and SVN credentials.
  • Adds documentation, example usage, and index entries.
File summaries
File Description
.github/workflows/wp-org-svn-deploy.yml Implements the reusable deployment workflow.
examples/wp-org-svn-deploy.yml Provides a manual-dispatch caller example.
docs/workflows/wp-org-svn-deploy.md Documents usage and configuration.
README.md Adds the workflow to the main index.
docs/README.md Adds the workflow documentation entry.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/wp-org-svn-deploy.yml Outdated
Comment thread examples/wp-org-svn-deploy.yml Outdated
uses: udx/reusable-workflows/.github/workflows/wp-org-svn-deploy.yml@master
with:
tag: ${{ github.event.inputs.tag }}
dry_run: ${{ github.event.inputs.dry_run }}
Copilot AI review requested due to automatic review settings September 2, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

SVN deployments need serialization, and the dry-run credential documentation is inaccurate.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment on lines +31 to +34
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
Comment thread docs/workflows/wp-org-svn-deploy.md Outdated

- Deploys `trunk/` + `tags/<tag>/` to `plugins.svn.wordpress.org/<slug>/`
- Handles `.wordpress-org/` assets (banners, icons, screenshots) when present
- `dry_run` mode rehearses checkout and SVN package preparation without committing (credentials and commit permission are only exercised on a real run)
Copilot AI review requested due to automatic review settings September 2, 2026 17:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Tag validation permits @, which can break SVN path handling.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread .github/workflows/wp-org-svn-deploy.yml Outdated
Comment on lines +43 to +46
if [[ "${TAG}" == *"/"* ]]; then
echo "::error::Tag '${TAG}' must not contain slashes (SVN tag path would be nested)."
exit 1
fi

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The workflow contract, security settings, pinned dependencies, documentation, and example are complete and consistent.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@andypotanin
andypotanin merged commit b047adc into master Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants