Skip to content

Commit e43b85e

Browse files
committed
feat: Add GitHub Actions workflows for build and release automation
- Implemented build workflow for main and develop branches - Added release workflow triggered by version tags - Created CHANGELOG.md to document notable changes - Included LICENSE file for GPL v2 licensing - Developed comprehensive documentation index for easier navigation
1 parent 62bf2a0 commit e43b85e

File tree

13 files changed

+1169
-429
lines changed

13 files changed

+1169
-429
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
cache: 'npm'
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v2
25+
with:
26+
version: 10.24.0
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Type check
32+
run: pnpm run type-check
33+
34+
- name: Lint
35+
run: pnpm run lint
36+
37+
- name: Build
38+
run: pnpm run build
39+
40+
- name: Build plugin
41+
run: pnpm run build:plugin
42+
43+
- name: Upload build artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: plugin-build
47+
path: plugin/
48+
retention-days: 5

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build & Release Plugin
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '18'
22+
cache: 'npm'
23+
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v2
26+
with:
27+
version: 10.24.0
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Build plugin
33+
run: pnpm run build:plugin:release
34+
35+
- name: Get version from tag
36+
id: get_version
37+
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
38+
39+
- name: Create Release
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
files: dist/openfields-*.zip
43+
draft: false
44+
prerelease: false
45+
body: |
46+
# OpenFields v${{ steps.get_version.outputs.version }}
47+
48+
## Installation
49+
50+
1. Download `openfields-${{ steps.get_version.outputs.version }}.zip` below
51+
2. Go to WordPress Admin → **Plugins** → **Add New**
52+
3. Click **Upload Plugin** and select the ZIP file
53+
4. Click **Install Now** and then **Activate Plugin**
54+
55+
## What's New
56+
57+
See the [full changelog](https://github.com/novincode/openfields/blob/main/CHANGELOG.md) for details.
58+
59+
---
60+
61+
**OpenFields** - The free, open-source alternative to ACF for WordPress
62+
63+
[Documentation](https://openfields.codeideal.com/docs) | [GitHub](https://github.com/novincode/openfields)
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Changelog
2+
3+
All notable changes to OpenFields will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- GitHub Actions workflow for automated releases
12+
- Comprehensive documentation index
13+
- Cross-linked documentation for better navigation
14+
- LICENSE file at repository root
15+
- Updated CONTRIBUTING.md with step-by-step guide
16+
- GitHub Actions build verification workflow
17+
18+
### Fixed
19+
- TypeScript type error in ConditionalLogicPanel (field ID to string conversion)
20+
- Deprecated `get_openfields()` reference removed from documentation
21+
22+
### Changed
23+
- Completely redesigned README for user-friendliness
24+
- Simplified and reorganized CONTRIBUTING.md
25+
- Added "See Also" links to all main documentation files
26+
- Improved documentation discoverability with INDEX.md
27+
28+
---
29+
30+
## [0.1.0] - 2024-12-11
31+
32+
### Features
33+
- ✨ Visual field builder with drag-and-drop interface
34+
- 📋 Core field types (text, textarea, select, radio, checkbox, switch, repeater, group, etc.)
35+
- 🎯 Conditional logic system with field ID-based references
36+
- 📍 Location rules for post types, taxonomies, and user roles
37+
- 🎨 Custom CSS per fieldset
38+
- 📤 Import/Export fieldsets as JSON
39+
- 🔌 REST API endpoints for headless usage
40+
- 📱 Responsive admin interface built with React 18 + TypeScript
41+
- 🧪 Field copy/paste functionality
42+
43+
### Backend
44+
- WordPress plugin with PSR-4 autoloading
45+
- Custom database tables for fieldsets and fields
46+
- Automatic meta storage routing (post/user/term meta)
47+
- Full REST API with proper authentication
48+
- WordPress.org compliant code structure
49+
50+
### Admin Interface
51+
- React 18 + TypeScript with Vite
52+
- shadcn/ui components and Tailwind CSS
53+
- Zustand state management
54+
- @dnd-kit for drag-and-drop functionality
55+
- Hot reload development experience
56+
57+
### Documentation
58+
- Comprehensive developer guide
59+
- Architecture reference
60+
- Build system documentation
61+
- WordPress compliance guidelines
62+
- Quick reference for common tasks
63+
64+
---
65+
66+
## Release Process
67+
68+
To create a new release:
69+
70+
1. **Update version in `package.json`**:
71+
```bash
72+
pnpm version patch # or minor, major
73+
```
74+
75+
2. **Build the release**:
76+
```bash
77+
pnpm run build:plugin:release
78+
```
79+
80+
3. **Create a git tag**:
81+
```bash
82+
git tag v$(node -p "require('./package.json').version")
83+
```
84+
85+
4. **Push to GitHub**:
86+
```bash
87+
git push origin main --tags
88+
```
89+
90+
GitHub Actions will automatically:
91+
- Build the plugin
92+
- Create a release on GitHub
93+
- Upload the ZIP file for download
94+
95+
See [BUILD.md](./docs/BUILD.md) for detailed build instructions.
96+
97+
---
98+
99+
## Planned Features
100+
101+
### Phase 2 (v1.1)
102+
- Advanced field types (WYSIWYG, Color Picker, Date/Time)
103+
- Field validation rules
104+
- Performance optimizations
105+
- CLI commands for scaffolding
106+
107+
### Phase 3 (v2.0)
108+
- Enhanced repeater and flexible content
109+
- Custom field type builder UI
110+
- GraphQL support
111+
- Block editor integration
112+
- Field template library
113+
114+
---
115+
116+
## Installation
117+
118+
### For Users
119+
1. Download from [Releases](https://github.com/novincode/openfields/releases)
120+
2. Upload ZIP to WordPress admin → Plugins → Add New → Upload Plugin
121+
3. Activate the plugin
122+
123+
### For Developers
124+
```bash
125+
git clone https://github.com/novincode/openfields.git
126+
cd openfields
127+
pnpm install
128+
pnpm run wp-env:start
129+
pnpm run dev
130+
```
131+
132+
---
133+
134+
## Support & Contributing
135+
136+
- 📖 See [README.md](./README.md) for overview
137+
- 🤝 See [CONTRIBUTING.md](./CONTRIBUTING.md) for how to contribute
138+
- 📚 See [Documentation Index](./docs/INDEX.md) for all docs
139+
- 🐛 Report issues on [GitHub Issues](https://github.com/novincode/openfields/issues)
140+
- 💬 Ask questions in [GitHub Discussions](https://github.com/novincode/openfields/discussions)
141+
142+
---
143+
144+
## License
145+
146+
OpenFields is licensed under **GPL v2 or later**. See [LICENSE](./LICENSE) for details.
147+
148+
Made with ❤️ by the OpenFields team

0 commit comments

Comments
 (0)