Skip to content

Commit 820a6a0

Browse files
authored
feat: add WordPress.org SVN deploy to release workflow (#745)
Adds a deploy-to-wporg job that runs after the existing build job. Uses 10up/action-wordpress-plugin-deploy with the existing .distignore. Pre-releases (alpha/beta/rc/dev/preview) are skipped automatically. Requires SVN_USERNAME and SVN_PASSWORD secrets to be configured.
1 parent 078f7f0 commit 820a6a0

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,50 @@ jobs:
116116
- Compatible with WordPress 5.3+
117117
- Requires PHP 7.4.30+
118118
- Always backup your site before upgrading
119+
120+
deploy-to-wporg:
121+
name: Deploy to WordPress.org
122+
runs-on: ubuntu-latest
123+
needs: build
124+
# Only deploy stable releases to wp.org (skip pre-releases)
125+
if: ${{ !contains(github.ref, '-alpha') && !contains(github.ref, '-beta') && !contains(github.ref, '-rc') && !contains(github.ref, '-dev') && !contains(github.ref, '-preview') }}
126+
127+
steps:
128+
- name: Checkout code
129+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
130+
with:
131+
fetch-depth: 0
132+
133+
- name: Setup PHP
134+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
135+
with:
136+
php-version: '7.4'
137+
extensions: mbstring, intl, curl
138+
tools: composer, wp-cli
139+
140+
- name: Set up Node.js
141+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
142+
with:
143+
node-version: '18'
144+
cache: 'npm'
145+
146+
- name: Install PHP dependencies
147+
run: composer install --no-dev --optimize-autoloader
148+
149+
- name: Install Node dependencies
150+
run: npm ci
151+
152+
- name: Build plugin
153+
run: npm run build
154+
env:
155+
MU_CLIENT_ID: ${{ secrets.MU_CLIENT_ID }}
156+
MU_CLIENT_SECRET: ${{ secrets.MU_CLIENT_SECRET }}
157+
158+
- name: Deploy to WordPress.org SVN
159+
uses: 10up/action-wordpress-plugin-deploy@stable
160+
with:
161+
generate-zip: false
162+
env:
163+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
164+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
165+
SLUG: ultimate-multisite

0 commit comments

Comments
 (0)