File tree Expand file tree Collapse file tree 2 files changed +29
-4
lines changed
Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ mkdir -p "$VERSION_DIR"
4040echo " Copy files from build directory"
4141rsync -ah --progress " $THEME_PATH /hello-elementor/" * " $VERSION_DIR "
4242
43- cd " $VERSION_DIR "
44-
4543echo " svn delete"
4644svn status | grep -v ' ^.[ \t]*\\..*' | { grep ' ^!' || true ; } | awk ' {print $2}' | xargs -r svn delete
4745
Original file line number Diff line number Diff line change @@ -6,16 +6,43 @@ permissions:
66
77on :
88 workflow_dispatch :
9+ inputs :
10+ version :
11+ description : ' Write the Theme version that sis about to get released to Production WordPress.org SVN'
12+ required : true
13+ type : string
914
1015jobs :
16+ validate :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+ - name : Validate branch name
22+ run : |
23+ BRANCH_NAME="${{ github.ref_name }}"
24+ if [[ ! "$BRANCH_NAME" =~ ^[0-9]+\.[0-9]+ ]]; then
25+ echo "::error::Branch name must match pattern (e.g., 3.4, 3.5). Current branch: $BRANCH_NAME"
26+ exit 1
27+ fi
28+ - name : Validate version input
29+ run : |
30+ PACKAGE_VERSION=$(cat package.json | jq -r '.version')
31+ INPUT_VERSION="${{ inputs.version }}"
32+ if [ "$INPUT_VERSION" != "$PACKAGE_VERSION" ]; then
33+ echo "::error::Input version ($INPUT_VERSION) does not match package.json version ($PACKAGE_VERSION)"
34+ exit 1
35+ fi
36+
1137 build :
38+ needs : validate
1239 if : ( github.actor == 'ManorHazaz' || github.actor == 'hein-obox' || github.actor == 'KingYes' || github.actor == 'arielk' || github.actor == 'nicoladj77' ) && startsWith( github.repository, 'elementor/' )
1340 uses : ./.github/workflows/build.yml
1441 secrets : inherit
1542
1643 deploy :
17- needs : build
18- if : needs.build.result == 'success'
44+ needs : [validate, build]
45+ if : needs.validate.result == 'success' && needs. build.result == 'success'
1946 runs-on : ubuntu-latest
2047 steps :
2148 - name : Checkout repository
You can’t perform that action at this time.
0 commit comments