Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
env: | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
BUILD_DIR: ./dist/${{ github.event.repository.name }}/ |