Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/actions/build-theme-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ runs:
- name: Create theme build directory
shell: bash
run: |
mkdir -p /tmp/hello-elementor-builds
mkdir -p /tmp/hello-theme-builds

- name: Package theme
shell: bash
env:
PACKAGE_VERSION: ${{ inputs.PACKAGE_VERSION }}
run: |
# Create zip file with proper naming (hello-elementor instead of hello-theme)
zip -r "/tmp/hello-elementor-builds/hello-elementor-${PACKAGE_VERSION}.zip" . \
# Create zip file with hello-theme naming (hardcoded, not from package.json)
zip -r "/tmp/hello-theme-builds/hello-theme-${PACKAGE_VERSION}.zip" . \
-x "node_modules/*" "test-results/*" "tests/*" ".git/*" "*.zip" \
"playwright-report/*" ".wp-env.json.*" ".wp-env"

Expand All @@ -62,11 +62,11 @@ runs:
env:
PACKAGE_VERSION: ${{ inputs.PACKAGE_VERSION }}
run: |
mv "/tmp/hello-elementor-builds/hello-elementor-${PACKAGE_VERSION}.zip" \
"./hello-elementor-${PACKAGE_VERSION}.zip"
mv "/tmp/hello-theme-builds/hello-theme-${PACKAGE_VERSION}.zip" \
"./hello-theme-${PACKAGE_VERSION}.zip"

echo "✅ Hello Elementor theme build complete: hello-elementor-${PACKAGE_VERSION}.zip"
ls -la hello-elementor-*.zip
echo "✅ Hello Elementor theme build complete: hello-theme-${PACKAGE_VERSION}.zip"
ls -la hello-theme-*.zip

# Set build path for downstream actions
echo "BUILD_ZIP_PATH=hello-elementor-${PACKAGE_VERSION}.zip" >> $GITHUB_ENV
echo "BUILD_ZIP_PATH=hello-theme-${PACKAGE_VERSION}.zip" >> $GITHUB_ENV
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,31 @@ runs:
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
token: ${{ inputs.token }}
commit-message: "chore: bump Hello Elementor version to v${{ inputs.package_version }}"
branch: release/v${{ inputs.package_version }}
title: "Release Hello Elementor v${{ inputs.package_version }}"
body: "Automated PR to bump Hello Elementor version for release."
body: |
## 🚀 Hello Elementor Release v${{ inputs.package_version }}

This automated PR bumps the Hello Elementor theme version for release.

### Changes:
- Updated version in `package.json`
- Updated version in `functions.php`
- Updated version in `style.css`
- Updated version in `readme.txt`

### Release:
- GitHub release: https://github.com/elementor/hello-theme/releases/tag/v${{ inputs.package_version }}

Ready for review and merge! 🎉
base: ${{ inputs.base_branch }}
add-paths: |
package.json
package-lock.json
functions.php
style.css
theme.json
readme.txt
assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ runs:

# Extract and update functions.php (Hello Elementor specific)
git show "origin/$DEFAULT_BRANCH:functions.php" > functions.php || exit 1
sed -i.bak "s/define( 'HELLO_ELEMENTOR_VERSION', '[^']*'/define( 'HELLO_ELEMENTOR_VERSION', '$NEW_VERSION' /" functions.php || exit 1
sed -i.bak "s/define( 'HELLO_ELEMENTOR_VERSION', '[^']*' );/define( 'HELLO_ELEMENTOR_VERSION', '$NEW_VERSION' );/" functions.php || exit 1
rm -f functions.php.bak
# Verify functions.php was actually updated
if ! grep -q "HELLO_ELEMENTOR_VERSION.*$NEW_VERSION" functions.php; then
Expand Down Expand Up @@ -246,4 +246,3 @@ runs:
functions.php
style.css
readme.txt
assets/scss/style.scss
2 changes: 1 addition & 1 deletion .github/config/release.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"release": {
"changelog_file": "readme.txt",
"changelog_section": "## Changelog",
"build_artifacts": ["hello-elementor.zip"],
"build_artifacts": ["hello-theme.zip"],
"wordpress_org": {
"manual_upload": true,
"theme_slug": "hello-elementor"
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/generate-upload-instructions-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set -e

# Get current version
PACKAGE_VERSION=$(node -p "require('./package.json').version")
THEME_SLUG=$(node -p "require('./package.json').name")
BUILD_ZIP="${THEME_SLUG}-${PACKAGE_VERSION}.zip"
# Use hardcoded hello-theme prefix for GitHub releases (different from package.json name)
BUILD_ZIP="hello-theme-${PACKAGE_VERSION}.zip"

echo "📋 **Hello Elementor v${PACKAGE_VERSION} - Manual Upload Instructions**"
echo ""
Expand All @@ -19,7 +19,7 @@ echo "📦 **Package Details:**"
echo " - Theme: Hello Elementor"
echo " - Version: v${PACKAGE_VERSION}"
echo " - Build File: ${BUILD_ZIP}"
echo " - Theme Slug: ${THEME_SLUG}"
echo " - GitHub Package: ${BUILD_ZIP}"
echo ""
echo "📋 **Manual Upload Steps:**"
echo ""
Expand Down
Loading