one-click-accessibility/.github/workflows/deploy.yml
2025-02-19 13:08:07 +02:00

54 lines
1.6 KiB
YAML

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' ) && 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"