@@ -65,28 +65,23 @@ ncc build index.js
6565
6666This 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
8075To 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
8479git checkout main
8580git branch -f to-package
8681git 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
9085git branch -f to-package
9186git push origin to-package --force
9287```
@@ -97,9 +92,7 @@ git push origin to-package --force
9792
98931 . Workflow ` .github/workflows/main_ci_and_package_action.yml ` is triggered with ` MUST_BE_PACKAGED=true `
99942 . 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 ` **
103964 . The code is packaged using ` @vercel/ncc ` → all deps bundled in ` dist/ `
104975 . A tag ` last-<ORPHAN_BRANCH> ` is created/updated to mark the source commit
105986 . The ` dist/ ` content is force-pushed to the orphan branch ` <ORPHAN_BRANCH> `
@@ -126,11 +119,11 @@ git push origin to-package --force
126119
1271203 . ** 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
1351284 . ** Verify the workflow execution** in GitHub Actions
136129 - Check that ` main_ci_and_package_action.yml ` completes successfully
0 commit comments