-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #438 from WordPress/add/wporg-deploy-action
Add automatic deployments to WP.org
- Loading branch information
Showing
4 changed files
with
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Deploy | ||
|
||
# Run deploy only on tag and master builds. | ||
on: | ||
push: | ||
branches: | ||
- master | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
|
||
deploy: | ||
name: Deploy to WordPress.org | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'npm' | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Setup PHP and Composer | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '5.6' | ||
tools: composer:v2 | ||
|
||
- name: Install NPM dependencies | ||
run: npm install | ||
|
||
- name: Authenticate with WordPress.org SVN | ||
run: svn info --non-interactive --username "${{ secrets.SVN_USERNAME }}" --password "${{ secrets.SVN_PASSWORD }}" https://plugins.svn.wordpress.org/two-factor/ | ||
|
||
- name: Deploy to WordPress.org SVN | ||
env: | ||
DEPLOY_SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
DEPLOY_TRUNK: ${{ contains( github.ref_name, 'master' ) }} | ||
DEPLOY_TAG: ${{ contains( github.ref_type, 'tag' ) }} | ||
DEPLOY_SKIP_CONFIRMATION: true | ||
if: env.DEPLOY_SVN_USERNAME | ||
run: npm run deploy |
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
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