Merge pull request #37 from mynaparrot/release-please--branches--main #58
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
name: Upload as release asset and transfer to WordPress | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-plugin: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-type: simple | |
- name: Checkout code | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/checkout@v4 | |
- name: Build project | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mkdir -p build | |
rsync -ar plugnmeet build/ | |
cd build | |
zip -X -r plugnmeet.zip * | |
gh release upload ${{ steps.release.outputs.tag_name }} plugnmeet.zip | |
- name: Upload to WordPress SVN | |
if: ${{ steps.release.outputs.release_created }} | |
uses: nk-o/action-wordpress-plugin-deploy@master | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SOURCE_DIR: plugnmeet/ | |
ASSETS_DIR: assets | |
SLUG: plugnmeet | |
VERSION: ${{ steps.release.outputs.tag_name }} |