Deploy #24
This file contains hidden or 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: Deploy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| VERSION: | |
| type: choice | |
| description: 'Version Type' | |
| options: | |
| - NONE | |
| - PATCH | |
| - MINOR | |
| - MAJOR | |
| required: true | |
| default: 'NONE' | |
| jobs: | |
| build: | |
| if: ( github.actor == 'KingYes' || github.actor == 'bainternet' || github.actor == 'arielk' || github.actor == 'aviranLevi1' ) && startsWith( github.repository, 'elementor/' ) | |
| uses: ./.github/workflows/build.yml | |
| secrets: inherit | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install SVN | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y subversion | |
| which svn | |
| svn --version | |
| - name: Download Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pojo-accessibility | |
| - run: ls -lah | |
| - name: unzip | |
| run: unzip pojo-accessibility.zip | |
| - name: Preparing envs | |
| run: | | |
| echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | |
| echo "PLUGIN_SLUG=$(cat package.json | jq -r '.name')" >> $GITHUB_ENV | |
| - name: Publish to WordPress.org SVN | |
| env: | |
| PLUGIN_SLUG: ${{ env.PLUGIN_SLUG }} | |
| PLUGIN_VERSION: ${{ env.PACKAGE_VERSION }} | |
| SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
| SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
| run: | | |
| bash "${GITHUB_WORKSPACE}/.github/scripts/validate-build-files.sh" | |
| bash "${GITHUB_WORKSPACE}/.github/scripts/publish-to-wordpress-org.sh" |