Skip to content
name: Deploy to WordPress.org Repository
# Allow manual triggering for testing but also trigger on release for real run
on:
workflow_dispatch:
release:
types: [released]
jobs:
# This job is based on and relies on the 10up action-wordpress-plugin-deploy action
deploy_to_wp_repository:
name: Deploy to WP.org
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Composer
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer:v2
coverage: none
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: NPM install, build and generate release artefacts
id: dist-build
run: |
npm install --ignore-scripts
npm run build
npm run dist:dotorg
echo "::set-output name=zip-path::./dist/${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip"
- name: WordPress plugin deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
dry-run: true # exists to prevent accidental deploys during testing
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
BUILD_DIR: ./dist/${{ github.event.repository.name }}/