Skip to content

Commit 987376f

Browse files
committed
ci: add GitHub Actions workflow for automated releases
- Create automatic ZIP file generation on tag push - Add release notes template - Ensure clean plugin package without development files
1 parent dbf31a1 commit 987376f

2 files changed

Lines changed: 173 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Create plugin directory
18+
run: mkdir -p postgrid-wp
19+
20+
- name: Copy plugin files
21+
run: |
22+
rsync -av --exclude-from='.gitignore' \
23+
--exclude='.git' \
24+
--exclude='.github' \
25+
--exclude='*.md' \
26+
--exclude='composer.lock' \
27+
--exclude='node_modules' \
28+
--exclude='tests' \
29+
--exclude='phpunit.xml' \
30+
--exclude='.gitignore' \
31+
--exclude='package-lock.json' \
32+
--exclude='RELEASE_NOTES_*' \
33+
./ postgrid-wp/
34+
35+
- name: Create ZIP file
36+
run: zip -r postgrid-wp-${{ github.ref_name }}.zip postgrid-wp/
37+
38+
- name: Create Release
39+
id: create_release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ github.ref }}
45+
release_name: PostGrid ${{ github.ref_name }}
46+
body: |
47+
## PostGrid ${{ github.ref_name }}
48+
49+
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
50+
51+
### Installation
52+
53+
1. Download `postgrid-wp-${{ github.ref_name }}.zip`
54+
2. Go to WordPress Admin → Plugins → Add New → Upload Plugin
55+
3. Select the downloaded ZIP file
56+
4. Activate the plugin
57+
58+
### Migration from Caxton
59+
60+
PostGrid includes full backwards compatibility with Caxton. See the [Migration Guide](https://github.com/${{ github.repository }}/blob/main/CAXTON_MIGRATION_GUIDE.md) for details.
61+
draft: false
62+
prerelease: false
63+
64+
- name: Upload Release Asset
65+
uses: actions/upload-release-asset@v1
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
with:
69+
upload_url: ${{ steps.create_release.outputs.upload_url }}
70+
asset_path: ./postgrid-wp-${{ github.ref_name }}.zip
71+
asset_name: postgrid-wp-${{ github.ref_name }}.zip
72+
asset_content_type: application/zip

RELEASE_NOTES_v0.1.0.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Release Notes for v0.1.0
2+
3+
## PostGrid v0.1.0 - Initial Release
4+
5+
**Release Date**: 10th July 2025
6+
7+
### 🎉 Introducing PostGrid
8+
9+
PostGrid is a lightweight WordPress posts grid block that's been completely refactored from the Caxton v1.30.1 codebase. This initial release focuses on simplicity, performance, and seamless migration from Caxton.
10+
11+
### ✨ Key Features
12+
13+
- **Clean & Minimal**: Simplified posts grid with modern WordPress standards
14+
- **Responsive Design**: 1-6 column layouts that adapt to any screen
15+
- **Smart Filtering**: Category selection and customisable post counts
16+
- **Flexible Display**: Toggle dates and excerpts to suit your needs
17+
- **Zero Dependencies**: No external libraries for maximum performance
18+
- **PSR-4 Autoloading**: Modern PHP architecture
19+
- **Direct Access Prevention**: Security-first approach on all PHP files
20+
21+
### 🔄 Legacy Caxton Support
22+
23+
PostGrid includes comprehensive backwards compatibility:
24+
- Automatic recognition of Caxton shortcodes (`[caxton/posts]`, `[caxton/posts-grid]`, etc.)
25+
- Intelligent attribute mapping
26+
- Gutenberg block conversion via `render_block` filter
27+
- Zero-downtime migration
28+
29+
### 📦 Installation
30+
31+
#### From GitHub Release
32+
1. Download `postgrid-wp-v0.1.0.zip` from the releases page
33+
2. Navigate to WordPress Admin → Plugins → Add New → Upload Plugin
34+
3. Select the downloaded file and activate
35+
36+
#### From Source
37+
1. Clone the repository: `git clone https://github.com/richardbaxterseo/postgrid-wp.git`
38+
2. Upload to `wp-content/plugins/postgrid-wp/`
39+
3. Activate via WordPress admin
40+
41+
### 🚀 Migration from Caxton
42+
43+
If you're currently using Caxton:
44+
1. Install PostGrid alongside Caxton
45+
2. Test your existing grids - they'll work immediately
46+
3. Once verified, deactivate Caxton
47+
4. Your grids continue working seamlessly
48+
49+
**Supported Caxton Formats**:
50+
- `[caxton/posts]`
51+
- `[caxton/posts-grid]`
52+
- `[caxton/post-grid]`
53+
- `[caxton/grid]`
54+
- Gutenberg blocks: `<!-- wp:caxton/posts -->`
55+
56+
### 📖 Documentation
57+
58+
- [Migration Guide](https://github.com/richardbaxterseo/postgrid-wp/blob/main/CAXTON_MIGRATION_GUIDE.md)
59+
- [README](https://github.com/richardbaxterseo/postgrid-wp/blob/main/README.md)
60+
61+
### 🛠️ Technical Details
62+
63+
- **WordPress Version**: 6.0+
64+
- **PHP Version**: 7.4+
65+
- **License**: GPL v2 or later
66+
- **Text Domain**: postgrid
67+
68+
### 🤝 Contributing
69+
70+
PostGrid is open source! Feel free to:
71+
- Submit issues on [GitHub](https://github.com/richardbaxterseo/postgrid-wp/issues)
72+
- Create pull requests
73+
- Share feedback and suggestions
74+
75+
### 📋 Full Changelog
76+
77+
**Added**
78+
- Initial release of PostGrid plugin
79+
- Complete refactor from Caxton v1.30.1 codebase
80+
- Simplified posts grid block with modern WordPress standards
81+
- Legacy Caxton shortcode support for seamless migration
82+
- Gutenberg block conversion for Caxton blocks
83+
- Comprehensive migration guide
84+
- PSR-4 autoloading
85+
- Direct access prevention on all PHP files
86+
87+
**Features**
88+
- Responsive grid layout (1-6 columns)
89+
- Category filtering
90+
- Customisable post count
91+
- Date and excerpt display toggles
92+
- Order by date, title, or menu order
93+
- Ascending/descending sort options
94+
- Clean, minimal design
95+
- No external dependencies
96+
97+
---
98+
99+
**Download**: [postgrid-wp-v0.1.0.zip](#)
100+
**Repository**: https://github.com/richardbaxterseo/postgrid-wp
101+
**Issues**: https://github.com/richardbaxterseo/postgrid-wp/issues

0 commit comments

Comments
 (0)