Skip to content

Commit eff38c3

Browse files
committed
refactor: remove main-version, use umami-server-3.0.3 for QA
- Remove main-version orphan branch (simplify workflow) - QA workflows now test umami-server-3.0.3 directly - Packaging only via to-package (no auto-package on main push) - Apply DRY: simplify workflow headers, point to CONTRIBUTING.md - Document auto-save timing in agent.md (15s idle recommendation) Breaking: main-version branch deleted, QA now explicit version-based
1 parent a8a1c1a commit eff38c3

5 files changed

Lines changed: 29 additions & 68 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,23 @@ ncc build index.js
6565

6666
This project uses **orphan branches** to distribute packaged versions of the action (with all dependencies bundled in `dist/`).
6767

68-
**Two types of orphan branches exist:**
69-
70-
1. **`main-version`** - Auto-generated from the `main` branch
71-
- Used for QA and testing the latest development version
72-
- Always points to the latest packaged version of `main`
73-
74-
2. **`umami-server-X.Y.Z`** - Version-specific branches (defined in `package.json::orphanBranch`)
75-
- Used for stable releases compatible with specific Umami server versions
76-
- Examples: `umami-server-3.0.3` for Umami v3.0.3, `umami-server-2.17.0` for Umami v2.17.x
68+
**Orphan branches** are named after the Umami server version they support (e.g., `umami-server-3.0.3`).
69+
- Defined in `package.json::orphanBranch`
70+
- Used for stable releases and QA testing
71+
- Examples: `umami-server-3.0.3` for Umami v3.0.3, `umami-server-2.17.0` for Umami v2.17.x
7772

7873
### The `to-package` branch mechanism
7974

8075
To trigger packaging, use the **`to-package` branch** as a pointer:
8176

8277
```bash
83-
# To package the current main branch → creates/updates 'main-version'
78+
# To package the current main branch → creates/updates orphan branch from package.json::orphanBranch
8479
git checkout main
8580
git branch -f to-package
8681
git push origin to-package --force
8782

88-
# To package a specific version → creates/updates orphan branch from package.json
89-
git checkout v6.0.2
83+
# To package a specific version tag
84+
git checkout v7.0.0
9085
git branch -f to-package
9186
git push origin to-package --force
9287
```
@@ -97,9 +92,7 @@ git push origin to-package --force
9792

9893
1. Workflow `.github/workflows/main_ci_and_package_action.yml` is triggered with `MUST_BE_PACKAGED=true`
9994
2. The workflow checks out the commit pointed by `to-package`
100-
3. The workflow determines the target orphan branch name **from that commit's `package.json`**:
101-
- If source branch is `main``ORPHAN_BRANCH=main-version` (hardcoded)
102-
- Otherwise → `ORPHAN_BRANCH=$(jq -r .orphanBranch package.json)` (reads from checked-out commit)
95+
3. The workflow reads the target orphan branch name **from that commit's `package.json::orphanBranch`**
10396
4. The code is packaged using `@vercel/ncc` → all deps bundled in `dist/`
10497
5. A tag `last-<ORPHAN_BRANCH>` is created/updated to mark the source commit
10598
6. The `dist/` content is force-pushed to the orphan branch `<ORPHAN_BRANCH>`
@@ -126,11 +119,11 @@ git push origin to-package --force
126119

127120
3. **Point `to-package` to the version you want to publish:**
128121
```bash
129-
git checkout v6.0.2 # The commit containing the orphanBranch value
122+
git checkout v7.0.0 # The commit containing the orphanBranch value
130123
git branch -f to-package
131124
git push origin to-package --force
132125
```
133-
💡 The workflow will read `package.json::orphanBranch` from this commit (v6.0.2)
126+
💡 The workflow will read `package.json::orphanBranch` from this commit (v7.0.0)
134127

135128
4. **Verify the workflow execution** in GitHub Actions
136129
- Check that `main_ci_and_package_action.yml` completes successfully

.github/workflows/main_ci_and_package_action.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
# 📦 CI/CD Pipeline with Packaging
22
#
3-
# This workflow performs:
4-
# 1. CI: Tests, audit, coverage for all triggers
5-
# 2. PACKAGING: Creates distributable orphan branches (only on 'to-package' or 'main' push)
3+
# CI: Tests, audit, coverage for all triggers
4+
# PACKAGING: Creates orphan branches via 'to-package' branch
65
#
7-
# 🎯 PACKAGING MECHANISM:
8-
# To package a branch, point 'to-package' to it:
9-
# git checkout <target-branch> # e.g., main, v6.0.2, etc.
10-
# git branch -f to-package
11-
# git push origin to-package --force
12-
#
13-
# The target orphan branch is determined by the package.json OF THE COMMIT pointed by 'to-package':
14-
# - Source = 'main' → orphan branch = 'main-version' (hardcoded for QA/testing)
15-
# - Source = other → orphan branch = package.json::orphanBranch of that commit (for releases)
16-
#
17-
# 📚 See CONTRIBUTING.md section "HowTo publish a new umami-server compatible branch"
6+
# 📚 Full documentation: .github/CONTRIBUTING.md "HowTo publish a new umami-server compatible branch"
187
#
198
name: main_ci_and_package_action
209
permissions:
@@ -28,7 +17,7 @@ on:
2817
push:
2918
branches:
3019
- to-package # 📦 Packaging trigger: points to the branch to package
31-
- main # 🧪 CI + creates 'main-version' orphan branch
20+
- main # 🧪 CI only (no packaging)
3221
pull_request:
3322
paths:
3423
- 'lib/**'
@@ -133,17 +122,12 @@ jobs:
133122
run: pnpm install -g @vercel/ncc
134123
if: env.MUST_BE_PACKAGED == 'true'
135124

136-
- name: PACKAGE - SETUP - Define ORPHAN_BRANCH name
125+
- name: PACKAGE - SETUP - Define ORPHAN_BRANCH name from package.json
137126
id: get_branch
138127
if: env.MUST_BE_PACKAGED == 'true'
139128
run: |
140-
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
141-
echo "ORPHAN_BRANCH=main-version" >> $GITHUB_ENV
142-
else
143129
echo "ORPHAN_BRANCH=$(jq -r .orphanBranch package.json)" >> $GITHUB_ENV
144-
fi
145130
# nb: jq extracts from package.json using 'orphanBranch' as key
146-
# warn: dont target 'main' as orphan branch
147131

148132
- name: PACKAGE - BUILD - autonomous package Action with deps in dist/ and update last tag
149133
if: env.MUST_BE_PACKAGED == 'true'

.github/workflows/main_manual_qa_cloud.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
# 🧪 QA Test - Umami Cloud (using main-version orphan branch)
1+
# 🧪 QA Test - Umami Cloud (@umami-server-3.0.3)
22
#
3-
# This workflow tests the PACKAGED version from the 'main-version' orphan branch.
4-
#
5-
# ℹ️ The 'main-version' branch is automatically updated when:
6-
# - Pushing to 'main' branch (auto-packaging)
7-
# - Forcing 'to-package' to point to 'main' then pushing it
8-
#
9-
# 🔄 To update 'main-version' with latest main:
10-
# git checkout main && git pull
11-
# git branch -f to-package && git push origin to-package --force
12-
#
13-
# 📚 See CONTRIBUTING.md "HowTo publish a new umami-server compatible branch"
3+
# Tests packaged orphan branch. To update version: edit 'uses:' line below.
4+
# 📚 Doc: .github/CONTRIBUTING.md "HowTo publish a new umami-server compatible branch"
145
#
156
name: main_manual_qa_cloud
167
permissions:
@@ -22,7 +13,7 @@ on:
2213

2314
jobs:
2415
umamiReportJob:
25-
name: Manual QA Umami Cloud action-umami-report@main-version
16+
name: Manual QA Umami Cloud action-umami-report@umami-server-3.0.3
2617
runs-on: ubuntu-latest
2718
env:
2819
UMAMI_LOGO: https://raw.githubusercontent.com/umami-software/website/refs/heads/master/public/images/umami-logo.png
@@ -33,9 +24,9 @@ jobs:
3324
# umami_report: ${{ steps.umamiReport.outputs.umamiReport }}
3425
# umami_one_line_report: ${{ steps.umamiReport.outputs.umamiOneLineReport }}
3526
steps:
36-
- name: QA Umami report - orphanBranch=main-version
27+
- name: QA Umami report - orphanBranch=umami-server-3.0.3
3728
id: umamiReportStep
38-
uses: boly38/action-umami-report@main-version
29+
uses: boly38/action-umami-report@umami-server-3.0.3
3930
with:
4031
umami-cloud-api-key: ${{secrets.UMAMI_TEST_CLOUD_API_KEY}}
4132
umami-site-domain: ${{secrets.UMAMI_TEST_CLOUD_SITE_DOMAIN}}

.github/workflows/main_manual_qa_host.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
# 🧪 QA Test - Umami Hosted (using main-version orphan branch)
1+
# 🧪 QA Test - Umami Hosted (@umami-server-3.0.3)
22
#
3-
# This workflow tests the PACKAGED version from the 'main-version' orphan branch.
4-
#
5-
# ℹ️ The 'main-version' branch is automatically updated when:
6-
# - Pushing to 'main' branch (auto-packaging)
7-
# - Forcing 'to-package' to point to 'main' then pushing it
8-
#
9-
# 🔄 To update 'main-version' with latest main:
10-
# git checkout main && git pull
11-
# git branch -f to-package && git push origin to-package --force
12-
#
13-
# 📚 See CONTRIBUTING.md "HowTo publish a new umami-server compatible branch"
3+
# Tests packaged orphan branch. To update version: edit 'uses:' line below.
4+
# 📚 Doc: .github/CONTRIBUTING.md "HowTo publish a new umami-server compatible branch"
145
#
156
name: main_manual_qa_host
167
permissions:
@@ -22,7 +13,7 @@ on:
2213

2314
jobs:
2415
umamiReportJob:
25-
name: Manual QA Umami Hosted action-umami-report@main-version
16+
name: Manual QA Umami Hosted action-umami-report@umami-server-3.0.3
2617
runs-on: ubuntu-latest
2718
env:
2819
UMAMI_LOGO: https://raw.githubusercontent.com/umami-software/website/refs/heads/master/public/images/umami-logo.png
@@ -33,9 +24,9 @@ jobs:
3324
# umami_report: ${{ steps.umamiReport.outputs.umamiReport }}
3425
# umami_one_line_report: ${{ steps.umamiReport.outputs.umamiOneLineReport }}
3526
steps:
36-
- name: QA Umami report - orphanBranch=main-version
27+
- name: QA Umami report - orphanBranch=umami-server-3.0.3
3728
id: umamiReportStep
38-
uses: boly38/action-umami-report@main-version
29+
uses: boly38/action-umami-report@umami-server-3.0.3
3930
with:
4031
umami-server: ${{secrets.UMAMI_SERVER}}
4132
umami-user: ${{secrets.UMAMI_USERNAME}}

agent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ env/ ← Templates config locale (.env, init scripts)
6161
**Solutions**:
6262
- Préférer `intellij_get_file_text_by_path` après `multi_edit` (lit buffer IDE)
6363
- Éviter `grep`/`cat` immédiatement après édition (lit disque non sauvegardé)
64+
- **Auto-save IDE**: Settings → System Settings → Synchronization (recommandé: 15s idle)
65+
- Attendre ~15-20s avant `git status`/`git diff` après éditions multiples
6466

6567
### Exceptions acceptées
6668

0 commit comments

Comments
 (0)