From 3cf050127006fe4a7284dcfa6cd9928da6ce878e Mon Sep 17 00:00:00 2001 From: Manor Hazaz Date: Wed, 21 Jan 2026 12:56:22 +0000 Subject: [PATCH 1/2] Internal: Fix deploy action [TMZ-1013] --- .github/scripts/publish-theme-to-wordpress-org.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/scripts/publish-theme-to-wordpress-org.sh b/.github/scripts/publish-theme-to-wordpress-org.sh index 2a55ff75..cfb6aad2 100755 --- a/.github/scripts/publish-theme-to-wordpress-org.sh +++ b/.github/scripts/publish-theme-to-wordpress-org.sh @@ -40,8 +40,6 @@ mkdir -p "$VERSION_DIR" echo "Copy files from build directory" rsync -ah --progress "$THEME_PATH/hello-elementor/"* "$VERSION_DIR" -cd "$VERSION_DIR" - echo "svn delete" svn status | grep -v '^.[ \t]*\\..*' | { grep '^!' || true; } | awk '{print $2}' | xargs -r svn delete From 7bd0048cc6ec393970ac122977e9d0412d5cefce Mon Sep 17 00:00:00 2001 From: Manor Hazaz Date: Wed, 21 Jan 2026 13:38:31 +0000 Subject: [PATCH 2/2] add validation --- .github/workflows/deploy.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c9088b9b..000fed46 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,16 +6,43 @@ permissions: on: workflow_dispatch: + inputs: + version: + description: 'Write the Theme version that sis about to get released to Production WordPress.org SVN' + required: true + type: string jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Validate branch name + run: | + BRANCH_NAME="${{ github.ref_name }}" + if [[ ! "$BRANCH_NAME" =~ ^[0-9]+\.[0-9]+ ]]; then + echo "::error::Branch name must match pattern (e.g., 3.4, 3.5). Current branch: $BRANCH_NAME" + exit 1 + fi + - name: Validate version input + run: | + PACKAGE_VERSION=$(cat package.json | jq -r '.version') + INPUT_VERSION="${{ inputs.version }}" + if [ "$INPUT_VERSION" != "$PACKAGE_VERSION" ]; then + echo "::error::Input version ($INPUT_VERSION) does not match package.json version ($PACKAGE_VERSION)" + exit 1 + fi + build: + needs: validate if: ( github.actor == 'ManorHazaz' || github.actor == 'hein-obox' || github.actor == 'KingYes' || github.actor == 'arielk' || github.actor == 'nicoladj77' ) && startsWith( github.repository, 'elementor/' ) uses: ./.github/workflows/build.yml secrets: inherit deploy: - needs: build - if: needs.build.result == 'success' + needs: [validate, build] + if: needs.validate.result == 'success' && needs.build.result == 'success' runs-on: ubuntu-latest steps: - name: Checkout repository