GitHub Action
Deploy to WordPress.org / SVN repository
1.0.0
Latest version
Deploy WordPress Plugin to SVN repository
This action commits files to your SVN repository (totally unopinionated about how or when you do it).
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: WordPress Plugin Deploy
id: deploy
uses: richard-muvirimi/deploy-wordpress-plugin@development
with:
svn-username: ${{ secrets.SVN_USERNAME }}
svn-password: ${{ secrets.SVN_PASSWORD }}
Optionally a zip file of the commited files can be generated and path provided incase you want to run further actions, for example
- 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.plugin-zip }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
Tags are created/updated on each run using provided plugin-version
for the tag to target.
- On tag creation. Version will be picked from latest tag.
on:
push:
tags:
- "*"
- Having a production only branch where you merge to when ready. Version being picked from
readme.txt
. - Any other events that trigger workflows
Name | Description | Default |
---|---|---|
svn-username
|
SVN repository username. | required |
svn-password
|
SVN repository password. | required |
plugin-repository
|
The svn repository name (slug) of the plugin on WordPress.org. Can be a full url to use a custom repository. Defaults to git repository name if empty. Default empty. |
''
|
plugin-zip
|
Zip file name to generate, any custom text to name differently, "slug" (default) to use plugin slug, set empty to disable. .zip will be automatically appended.
|
'slug'
|
plugin-zip-folder
|
Folder name to use at root of zip, "slug" to use plugin slug, set empty to disable. |
'slug'
|
plugin-version
|
Tag for releasing to WordPress, any custom text to use a custom tag, "tag" to read from release tags, "readme" (default) to obtain from readme.txt. |
'readme'
|
commit-message
|
Commit message for releasing to WordPress, any custom text to use a custom message, "git" (default) to use the last git commit message. Substitutes :VERSION with provided/inferred plugin version.
|
'git'
|
working-directory
|
Working directory, defaults to $GITHUB_WORKSPACE if empty. All files in working directory will be committed, except those in "assets-directory" directory. Default empty.
|
''
|
assets-directory
|
Directory containing plugin assets, defaults to .wordpress-org , set empty to disable.
|
'.wordpress-org'
|
Name | Description |
---|---|
plugin-zip
|
Path to generated plugin zip file, if plugin-zip was set.
|
plugin-version
|
The version tag used to commit to plugin-repository
|
commit-message
|
The message used to commit to plugin-repository
|
- Old tag cleanup
- Keep latest version of previous minor versions, and all versions for the current version
- Keep limited number of versions
- Replicate github versions
Just make sure all contributing guidelines are met.
MIT License
Copyright (c) 2022 Richard Muvirimi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.