Skip to content

Commit

Permalink
improve(NO-JIRA): Separate Deploy to .org to different workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronware committed Aug 19, 2023
1 parent ebedcf8 commit 27ba37a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,3 @@ jobs:
tag: ${{ steps.get_version.outputs.tag }}
name: post-type-spotlight.zip
overwrite: true

- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@2.2.0
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
65 changes: 65 additions & 0 deletions .github/workflows/wordpress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
on:
release:
types: [published]

name: Deploy to WordPress.org

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Get Version From Tag
id: get_version
uses: actions-ecosystem/action-get-latest-tag@v1.6.0
with:
semver_only: true

- name: Latest Version
id: latest_version
run: |
TAG=${{ steps.get_version.outputs.tag }}
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

- name: Composer Install
uses: php-actions/composer@v6
with:
working_dir: ./
dev: no
php_version: 7.4

- name: Build Base Plugin Assets
run: |
npm install && npm run build
rm -rf node_modules
- name: Build Blocks
run: |
cd ./blocks/
npm install && npm run build
rm -rf node_modules
- name: Clean Build Files/Folders
run: |
chmod +x ./.deployment/cleanup.sh
sh ./.deployment/cleanup.sh;
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@2.1.1
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}

- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}

0 comments on commit 27ba37a

Please sign in to comment.