-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve(NO-JIRA): Separate Deploy to .org to different workflow
- Loading branch information
Showing
2 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
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
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
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 }} |