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
19 changes: 7 additions & 12 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get Plugin Version
id: get_version
Expand All @@ -22,31 +22,26 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "::set-output name=version::$VERSION"

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The set-output command is deprecated in GitHub Actions. This command was deprecated in favor of environment files and will cause warnings or failures in future GitHub Actions runners. Use $GITHUB_OUTPUT instead of set-output.

Suggested change
echo "::set-output name=version::$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT

Copilot uses AI. Check for mistakes.

- name: Create ZIP
- name: Create Versioned ZIP
run: |
mkdir -p releases
zip -r releases/accordion-hero-slider.zip accordion-hero-slider -x "*.DS_Store*" "*.git*"
zip -r releases/accordion-hero-slider-v${{ env.VERSION }}.zip accordion-hero-slider -x "*.DS_Store*" "*.git*"

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the README.md exclusion from the zip command means the repository's main README.md will now be included in the plugin ZIP file, which could be confusing for end users. The previous version correctly excluded it with "*/README.md" to prevent including unwanted documentation files.

Suggested change
zip -r releases/accordion-hero-slider-v${{ env.VERSION }}.zip accordion-hero-slider -x "*.DS_Store*" "*.git*"
zip -r releases/accordion-hero-slider-v${{ env.VERSION }}.zip accordion-hero-slider -x "*.DS_Store*" "*.git*" "*/README.md"

Copilot uses AI. Check for mistakes.

- name: Rename ZIP for PR (Pull Request only)
- name: Prepare ZIP for PR (Pull Request only)
if: github.event_name == 'pull_request'
run: |
mv releases/accordion-hero-slider.zip releases/accordion-hero-slider-PR-${{ github.event.pull_request.number }}.zip

- name: Rename ZIP for Release (Push to Tag or Main)
if: github.event_name == 'push'
run: |
cp releases/accordion-hero-slider.zip releases/accordion-hero-slider-v${{ env.VERSION }}.zip
mv releases/accordion-hero-slider-v${{ env.VERSION }}.zip releases/accordion-hero-slider-v${{ env.VERSION }}-PR-${{ github.event.pull_request.number }}.zip

- name: Upload Build Artifact (PR Only)
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: accordion-hero-slider-PR-${{ github.event.pull_request.number }}
path: releases/*.zip

- name: Create Release (Tag Only)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: releases/accordion-hero-slider-v${{ env.VERSION }}.zip
body: "Official release version ${{ env.VERSION }}"
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Accordion Hero Slider - Project Repository
# Custom Elementor Widgets Repository

This repository contains the source code for the **Accordion Hero Slider** Elementor widget.
This repository is a collection of premium, high-fidelity custom widgets for **Elementor**. Each widget is built as a standalone WordPress plugin for maximum portability and ease of use.

## 📂 Repository Structure

- `accordion-hero-slider/`: The main plugin source code.
- `accordion-hero-slider/`: A premium horizontal accordion hero slider with industry-focused design.
- `.github/workflows/`: GitHub Actions for automated builds and releases.
- `releases/`: (Automated) Directory where the latest plugin ZIP files are stored.
- `build-zip.sh`: Shell script to manually package the plugin.
- `build-zip.sh`: Shell script to manually package specific widgets.

## 🛠 For Developers

### Building the Plugin
To package the plugin into a ZIP file locally, run:
### Building a Widget
To package a specific widget into a ZIP file locally, run the build script. By default, it targets the `accordion-hero-slider`.
```bash
./build-zip.sh
```
This will create `releases/accordion-hero-slider.zip`.

### GitHub Actions
- **PR Build**: Every Pull Request automatically generates a versioned ZIP file for testing.
- **Release**: Merging to `main` (or pushing a tag) will automatically create a new GitHub Release with the plugin ZIP attached.
- **PR Build**: Every Pull Request automatically generates versioned ZIP files for the modified widgets.

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation states that every Pull Request generates "versioned ZIP files for the modified widgets" (plural), but the build process only creates a single ZIP file for the accordion-hero-slider widget. This is misleading as it suggests multiple widgets are built when only one is actually processed.

Suggested change
- **PR Build**: Every Pull Request automatically generates versioned ZIP files for the modified widgets.
- **PR Build**: Every Pull Request automatically generates a versioned ZIP file for the modified `accordion-hero-slider` widget.

Copilot uses AI. Check for mistakes.
- **Release**: Merging to `main` (or pushing a version tag like `v*`) will automatically create a new GitHub Release with the corresponding plugin ZIP attached.

## 📝 License
Licensed under GPL v2 or later.
All widgets in this repository are licensed under GPL v2 or later.
11 changes: 2 additions & 9 deletions build-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,9 @@ VERSIONED_ZIP_NAME="accordion-hero-slider-v$VERSION.zip"
# Create output directory if it doesn't exist
mkdir -p $OUTPUT_DIR

# Remove old zips
rm -f $OUTPUT_DIR/*.zip

# Create the zip file
# Create the versioned zip file
# Exclude git files and any other unnecessary local files
zip -r $OUTPUT_DIR/$ZIP_NAME $PLUGIN_DIR -x "*.DS_Store*" "*.git*" "*/README.md"

# Create a versioned copy
cp $OUTPUT_DIR/$ZIP_NAME $OUTPUT_DIR/$VERSIONED_ZIP_NAME
zip -r $OUTPUT_DIR/$VERSIONED_ZIP_NAME $PLUGIN_DIR -x "*.DS_Store*" "*.git*"

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the README.md exclusion from the zip command means the repository's main README.md will now be included in the plugin ZIP file, which could be confusing for end users. The previous version correctly excluded it with "*/README.md" to prevent including unwanted documentation files.

Copilot uses AI. Check for mistakes.

echo "✅ Build Complete!"
echo "📍 Main ZIP: $OUTPUT_DIR/$ZIP_NAME"
echo "📍 Versioned ZIP: $OUTPUT_DIR/$VERSIONED_ZIP_NAME"
Loading