Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
name: "Deploy to WordPress.org"
name: Deploy to WordPress.org repository

on:
push:
tags:
- "v*"
release:
types: [released]

jobs:
tag:
name: New tag
deploy_to_wordpress_org:
name: Deploy release
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@main
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@develop
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Optional: if we add a build step to the plugin, we can run it here.
# Deploy the plugin to WordPress.org
- name: WordPress plugin deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: aaa-option-optimizer
# After the deploy, we also want to create a zip and upload it to the release on Github. We don't want
# users to have to go to the repository to find our plugin :).
- name: Upload release asset
uses: Shopify/upload-to-release@master
with:
name: ${{ github.event.repository.name }}.zip
path: ${{ steps.deploy.outputs.zip-path }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
content-type: application/zip