Skip to content
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 code
uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache-dependency-path: 'package-lock.json'
cache: "npm"
- name: Build
run: |
npm ci --legacy-peer-deps
npm run build
- name: Composer
run: |
composer install --no-dev
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/[email protected]
with:
generate-zip: true
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: content-workflow-by-bynder
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip