feat: multi-branch versioning workflows and wiki #93
@@ -16,6 +16,10 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- alpha
|
||||
- beta
|
||||
- rc
|
||||
- 'feature/**'
|
||||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
@@ -57,29 +61,7 @@ jobs:
|
||||
|
||||
- name: Bump version
|
||||
run: |
|
||||
BUMP=$(php ${MOKO_CLI}/version_bump.php --path . 2>&1) || true
|
||||
echo "$BUMP"
|
||||
|
||||
VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null) || true
|
||||
[ -z "$VERSION" ] && { echo "No version found — skipping"; exit 0; }
|
||||
|
||||
# Propagate to platform manifests with -dev suffix
|
||||
php ${MOKO_CLI}/version_set_platform.php \
|
||||
--path . --version "$VERSION" --branch dev --stability dev 2>/dev/null || true
|
||||
php ${MOKO_CLI}/version_check.php --path . --fix 2>/dev/null || true
|
||||
VERSION="${VERSION}-dev"
|
||||
|
||||
# Commit if anything changed
|
||||
if git diff --quiet && git diff --cached --quiet; then
|
||||
echo "No version changes to commit"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
||||
git config --local user.name "gitea-actions[bot]"
|
||||
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||
git add -A
|
||||
git commit -m "chore(version): auto-bump patch ${VERSION} [skip ci]" \
|
||||
--author="gitea-actions[bot] <gitea-actions[bot]@mokoconsulting.tech>"
|
||||
git push origin dev
|
||||
echo "Bumped to ${VERSION}" >> $GITHUB_STEP_SUMMARY
|
||||
php ${MOKO_CLI}/version_auto_bump.php \
|
||||
--path . --branch "${GITHUB_REF_NAME}" \
|
||||
--token "${{ secrets.MOKOGITEA_TOKEN }}" \
|
||||
--repo-url "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||
|
||||
+62
-4
@@ -201,10 +201,68 @@ Creates SHA-256 checksums for all ZIP files in `dist/`.
|
||||
|
||||
### Branching Model
|
||||
|
||||
| Branch | Purpose |
|
||||
|--------|---------|
|
||||
| `main` | Stable releases |
|
||||
| `dev` | Active development |
|
||||
| Branch | Purpose | Stability Suffix |
|
||||
|--------|---------|-----------------|
|
||||
| `main` | Stable releases | (none) |
|
||||
| `dev` | Active development | `-dev` |
|
||||
| `alpha` | Alpha pre-releases | `-alpha` |
|
||||
| `beta` | Beta pre-releases | `-beta` |
|
||||
| `rc` | Release candidates | `-rc` |
|
||||
| `feature/*` | Feature development | `-dev` |
|
||||
| `version/XX.YY.ZZ` | Archived release snapshots | (none) |
|
||||
|
||||
### Version Numbering
|
||||
|
||||
Versions use the format `XX.YY.ZZ` (two-digit segments, zero-padded):
|
||||
|
||||
- **XX** -- Major version (breaking changes)
|
||||
- **YY** -- Minor version (new features, bumped on release to main)
|
||||
- **ZZ** -- Patch version (auto-incremented on every push to dev/feature branches)
|
||||
|
||||
Stability suffixes are appended during development:
|
||||
|
||||
- `02.09.00-dev` -- Development build
|
||||
- `02.09.00-alpha` -- Alpha pre-release
|
||||
- `02.09.00-beta` -- Beta pre-release
|
||||
- `02.09.00-rc` -- Release candidate
|
||||
|
||||
On merge to `main`, suffixes are stripped and the minor version is bumped.
|
||||
|
||||
### Auto Version Bump
|
||||
|
||||
On every push to `dev`, `alpha`, `beta`, `rc`, or `feature/*`:
|
||||
|
||||
1. The patch version is incremented (e.g., `02.08.05` -> `02.08.06`)
|
||||
2. The stability suffix is applied based on the branch name
|
||||
3. All version-bearing files are updated (manifests, CHANGELOG, PHP headers, etc.)
|
||||
4. A commit is created with `[skip ci]` to avoid infinite loops
|
||||
|
||||
Commits with `[skip ci]` or `[skip bump]` in the message are ignored.
|
||||
|
||||
### Auto Release
|
||||
|
||||
When a PR is merged from `dev` to `main`:
|
||||
|
||||
1. The minor version is bumped (e.g., `02.08.xx` -> `02.09.00`)
|
||||
2. Stability suffixes are stripped (stable release)
|
||||
3. A Gitea release is created with the build package (ZIP + tar.gz + SHA-256)
|
||||
4. `updates.xml` is updated for the Joomla update server
|
||||
5. The `dev` branch is recreated from `main`
|
||||
6. A `version/XX.YY.ZZ` archive branch is created
|
||||
|
||||
### Release Channels
|
||||
|
||||
The `updates.xml` file provides update streams for Joomla sites:
|
||||
|
||||
| Channel | Tag | Description |
|
||||
|---------|-----|-------------|
|
||||
| Development | `dev` | Latest dev build (or stable if higher) |
|
||||
| Alpha | `alpha` | Alpha pre-release |
|
||||
| Beta | `beta` | Beta pre-release |
|
||||
| Release Candidate | `rc` | RC pre-release |
|
||||
| Stable | `stable` | Production-ready release |
|
||||
|
||||
Joomla sites check the channel matching their configured stability level.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user