Skip to content

Releasing a plugin to the WordPress Repository#

The WordPress repository uses SVN, while we use git for our development. The easiest way to deploy a new version of a plugin is to automate it using a Github workflow.

Thankfully, 10up provides to the community a Github action made specifically for this task.

Below is an example workflow to add to your Github repository, under .github/workflows

name: Deploy to WordPress.org Repository
on:
  release:
    # run only when a new release is published, but not when it's classified as a pre-release.
    types: [released]
jobs:
  deploy_to_wp_repository:
    name: Deploy to WP.org
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v6

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: 7.4
        coverage: none  # XDebug can be enabled here 'coverage: xdebug'
        tools: composer:v2

    - name: Build
      run: composer install -o --no-dev --no-scripts

    - name: WordPress Plugin Deploy
      id: deploy
      uses: 10up/action-wordpress-plugin-deploy@stable
      env:
        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
        SVN_USERNAME: ${{ secrets.SVN_USERNAME }}

Things to know#

Release#

The workflow is triggered when creating a new release on Github.

Build step#

The example build step installs the composer dependencies and generates the autoloader. If you have a build step with npm as well, you can add it here.

Deploy step#

The example assumes your repository is named the same way as your plugin slug on the repository. If that's not the case, you can provide the slug in the env variables.