From 56c3bd4b206191e041c0ef302afdaf9a85f72000 Mon Sep 17 00:00:00 2001 From: Cai <115717560+CaiKDavis@users.noreply.github.com> Date: Tue, 24 Mar 2026 11:23:26 +0000 Subject: [PATCH] Release v0.11 (#38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(templates): tweaked * fix(workflows): preventing workflows from triggering both self and main * feat(templates): cleaned templates, removing unnecessary elements * feat(template): simplification * feat(cleanup): cleaned docs and cicd * fix(build-and-tes): fixed reference to publish-on-release * ci(naming): shortened run names * fix(build-and-test): added pip for smoke testing * bump: version 0.1.0 → 0.2.0 * feat(repo_template): added ci-orchestrator.yaml to git keep * bump: version 0.2.0 → 0.3.0 * fix(post-release-private): fixed triggering of back sync * bump: version 0.3.0 → 0.4.0 * feat(sync-from-public): added for downstream templating * bump: version 0.4.0 → 0.5.0 * fix(public-release): entered correct private/public repos * bump: version 0.5.0 → 0.6.0 * feat(back-sync-release): prevent running of tests * fix(back-sync-release-to-main): admin bypasses merge * bump: version 0.6.0 → 0.7.0 * feat(.gitignore): kept all *.yaml in template workflows * refactor(workflows): refactored to remove repeat calls to config.yaml * feat(review): reviewd inc docs * bump: version 0.7.0 → 0.8.0 * fix(sync-to-public): attempt override push * bump: version 0.8.0 → 0.8.1 * fix(sync-to-public2): new fix attempt * bump: version 0.8.1 → 0.8.2 * fix(development): force both workflows repos to use own orchestrators * bump: version 0.8.2 → 0.8.3 * fix(orchestrator): fix to internal/external entries * feat(publish-to-pypi): switched off by default * refactor(CI/CD): refactored to harden some flows, switch PYPI_PUBLISH to false by default, and sort naming clarity * bump: version 0.8.3 → 0.9.0 * build(self-orchestrator): runs simplified tests in development * bump: version 0.9.0 → 0.9.1 * fix(check-version): pip installed packaging * bump: version 0.9.1 → 0.9.2 * refactor(minor): tweaked comments and version check python version to 3.13 * feat(repo_template/orchestrator.yaml): tweaked naming * docs(rewrite): rewrote all docs * docs(README.md): tweaked workflows description * docs(README.md): tweaked mermaid * docs(README.md): added mermaid for lifecycle * fix(README.md): fixed development lifecycle * fix(README.md): fix attempt for lifecycle * docs(README.md): livecycle adjustments * feat(README.md): lifecycle adjust * docs(README.md): tweaks in descriptions * fix(README.md): fixed { * fix(README.md): fixed punctuation parsing * docs(README.md): switched develop and release loops * feat(README.md): added colouring * feat(README.md): removed merge from legend * feat(README.md): tweaked descriptions * feat(README.md): tweaked legend * fix(README.md): fixed legend colouring * fix(README.md): fixed legend * fix(README.md): fixed legend * fix(README.md): fixed legend * feat(README.md): tweaked develop/release layout * fix(README.md): fixed layout horizontally * fix(README.md): layout -reverted separate develop box * feat(README.md): reorganised * docs(README.md): corrected 1R * feat(README.md): added header and footger * fix(README.md): layout * fix(README.md): layout * feat(README.md): split post-release triggers * bump: version 0.9.2 → 0.10.0 * feat(sync-to-public): default behaviour false, with override * bump: version 0.10.0 → 0.10.1 * feat(repo_template): tweaked template to centralise config variables * docs(README.md): added development lifecyle figure in place of mermaid * bump: version 0.10.1 → 0.11.0 --- .github/workflows/central-orchestrator.yaml | 9 +- .github/workflows/config.yaml | 16 +++- .github/workflows/self-orchestrator.yaml | 1 + CHANGELOG.md | 12 +++ README.md | 67 +------------- docs/images/development_lifecycle.png | Bin 0 -> 403446 bytes pyproject.toml | 2 +- repo_template/.github/workflows/README.md | 29 +++--- repo_template/.github/workflows/config.yaml | 86 ++++++++++++++++++ .../.github/workflows/orchestrator.yaml | 43 ++++----- .../.github/workflows/sync-from-public.yaml | 11 ++- 11 files changed, 166 insertions(+), 110 deletions(-) create mode 100644 docs/images/development_lifecycle.png create mode 100644 repo_template/.github/workflows/config.yaml diff --git a/.github/workflows/central-orchestrator.yaml b/.github/workflows/central-orchestrator.yaml index efab71f..c39497f 100644 --- a/.github/workflows/central-orchestrator.yaml +++ b/.github/workflows/central-orchestrator.yaml @@ -71,6 +71,9 @@ on: publish-on-release: required: false type: string + sync-to-public: + required: false + type: string permissions: contents: write @@ -95,6 +98,7 @@ jobs: version-check-python-version: ${{ inputs.version-check-python-version }} publish-python-version: ${{ inputs.publish-python-version }} publish-on-release: ${{ inputs.publish-on-release }} + sync-to-public: ${{ inputs.sync-to-public }} route: name: Route @@ -120,6 +124,7 @@ jobs: PUBLIC_REPO_RELEASE_BRANCH: ${{ needs.env-config.outputs.PUBLIC_REPO_RELEASE_BRANCH }} PUBLIC_REPO_INCOMING_BRANCH: ${{ needs.env-config.outputs.PUBLIC_REPO_INCOMING_BRANCH }} PUBLISH_ON_RELEASE: ${{ needs.env-config.outputs.PUBLISH_ON_RELEASE }} + SYNC_TO_PUBLIC: ${{ needs.env-config.outputs.SYNC_TO_PUBLIC }} CALLER_EVENT_NAME: ${{ inputs.event-name }} CALLER_EVENT_ACTION: ${{ inputs.event-action }} CALLER_BASE_REF: ${{ inputs.base-ref }} @@ -191,7 +196,7 @@ jobs: if [ "$EVENT_NAME" = "workflow_dispatch" ]; then if [ "$REPOSITORY_NAME" = "$PRIVATE_REPO" ] && [ "$REF_NAME" = "$PRIVATE_REPO_RELEASE_BRANCH" ]; then RUN_BACK_SYNC=true - if [ -n "$PUBLIC_REPO" ] && [ "$PUBLIC_REPO" != "$PRIVATE_REPO" ]; then + if [ -n "$PUBLIC_REPO" ] && [ "$PUBLIC_REPO" != "$PRIVATE_REPO" ] && [ "$SYNC_TO_PUBLIC" = "true" ]; then RUN_SYNC_TO_PUBLIC=true fi fi @@ -215,7 +220,7 @@ jobs: if [ "$EVENT_ACTION" = "closed" ] && [ "$PR_MERGED" = "true" ] && [ "$HEAD_REF" = "$PRIVATE_REPO_MAIN_BRANCH" ]; then RUN_BACK_SYNC=true - if [ -n "$PUBLIC_REPO" ] && [ "$PUBLIC_REPO" != "$PRIVATE_REPO" ]; then + if [ -n "$PUBLIC_REPO" ] && [ "$PUBLIC_REPO" != "$PRIVATE_REPO" ] && [ "$SYNC_TO_PUBLIC" = "true" ]; then RUN_SYNC_TO_PUBLIC=true fi fi diff --git a/.github/workflows/config.yaml b/.github/workflows/config.yaml index 5c282e5..f64f24f 100644 --- a/.github/workflows/config.yaml +++ b/.github/workflows/config.yaml @@ -50,6 +50,9 @@ on: publish-on-release: required: false type: string + sync-to-public: + required: false + type: string outputs: # Package @@ -87,6 +90,8 @@ on: value: ${{ jobs.export-env.outputs.PUBLISH_PYTHON_VERSION }} PUBLISH_ON_RELEASE: value: ${{ jobs.export-env.outputs.PUBLISH_ON_RELEASE }} + SYNC_TO_PUBLIC: + value: ${{ jobs.export-env.outputs.SYNC_TO_PUBLIC }} @@ -117,7 +122,7 @@ env: # - ensure-release-source: validates private main->release and public incoming->release routes # - pre-release-version-check: PR to PRIVATE_REPO_RELEASE_BRANCH or PUBLIC_REPO_RELEASE_BRANCH # - back-sync-release-to-main: merged PR main->release in private repo (plus manual) - # - sync-to-public: merged PR to private release (plus manual) + # - sync-to-public: merged PR to private release (plus manual, when enabled) # - publish-to-pypi: merged PR to public release (plus manual on release branch) # - sync-from-public: manual only with selected public branch input @@ -127,6 +132,7 @@ env: VERSION_CHECK_PYTHON_VERSION: ${{ inputs.version-check-python-version || '3.13' }} PUBLISH_PYTHON_VERSION: ${{ inputs.publish-python-version || '3.13' }} PUBLISH_ON_RELEASE_RAW: ${{ inputs.publish-on-release || vars.PUBLISH_ON_RELEASE || 'false' }} + SYNC_TO_PUBLIC_RAW: ${{ inputs.sync-to-public || vars.SYNC_TO_PUBLIC || 'false' }} # ================= # End Manual Config # ================= @@ -159,6 +165,7 @@ jobs: VERSION_CHECK_PYTHON_VERSION: ${{ steps.set.outputs.VERSION_CHECK_PYTHON_VERSION }} PUBLISH_PYTHON_VERSION: ${{ steps.set.outputs.PUBLISH_PYTHON_VERSION }} PUBLISH_ON_RELEASE: ${{ steps.set.outputs.PUBLISH_ON_RELEASE }} + SYNC_TO_PUBLIC: ${{ steps.set.outputs.SYNC_TO_PUBLIC }} steps: @@ -181,6 +188,12 @@ jobs: exit 1 fi + sync_to_public="${SYNC_TO_PUBLIC_RAW,,}" + if [ "$sync_to_public" != "true" ] && [ "$sync_to_public" != "false" ]; then + echo "SYNC_TO_PUBLIC must be 'true' or 'false'." + exit 1 + fi + # Package echo "PACKAGE_NAME=$package_name" >> "$GITHUB_OUTPUT" echo "PACKAGE_SLUG=$package_slug" >> "$GITHUB_OUTPUT" @@ -206,3 +219,4 @@ jobs: echo "VERSION_CHECK_PYTHON_VERSION=${{ env.VERSION_CHECK_PYTHON_VERSION }}" >> "$GITHUB_OUTPUT" echo "PUBLISH_PYTHON_VERSION=${{ env.PUBLISH_PYTHON_VERSION }}" >> "$GITHUB_OUTPUT" echo "PUBLISH_ON_RELEASE=$publish_on_release" >> "$GITHUB_OUTPUT" + echo "SYNC_TO_PUBLIC=$sync_to_public" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/self-orchestrator.yaml b/.github/workflows/self-orchestrator.yaml index 71c010d..c38e245 100644 --- a/.github/workflows/self-orchestrator.yaml +++ b/.github/workflows/self-orchestrator.yaml @@ -39,4 +39,5 @@ jobs: version-check-python-version: '3.13' publish-python-version: '3.13' publish-on-release: 'false' + sync-to-public: 'true' secrets: inherit diff --git a/CHANGELOG.md b/CHANGELOG.md index 12090d6..2ff82b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## v0.11.0 (2026-03-24) + +### Feat + +- **repo_template**: tweaked template to centralise config variables + +## v0.10.1 (2026-03-24) + +### Feat + +- **sync-to-public**: default behaviour false, with override + ## v0.10.0 (2026-03-23) ### Feat diff --git a/README.md b/README.md index ae7dff0..31dd9a6 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This means workflow changes are tested directly from the current branch. - **Private/Public: `main/incoming_from_private` -> `release`:** Runs `ensure-release-source.yaml` and `pre-release-version-check.yaml` to ensure PR comes from `main` and version has been bumped ### PR Merged - - **Private: `main` -> `release`:** Runs `back-sync-release-to-main.yaml` and `sync-to-public.yaml` to commit the release back to main (private), and sync to the public repo. + - **Private: `main` -> `release`:** Runs `back-sync-release-to-main.yaml` and optionally `sync-to-public.yaml` (when `sync-to-public` is enabled) to commit the release back to main (private), and sync to the public repo. - **Public: `incoming_from_private` -> `release`:** Runs `publish-to-pypi.yaml` when `publish-on-release` is enabled. ### Manual Dispatch @@ -88,68 +88,9 @@ flowchart TD ``` ## Development Lifecycle - -```mermaid -flowchart TB - - subgraph LEGEND[Legend] - direction TB - L_S[Source Branch] - L_O(PR opened Workflow) - L_R{Review: n reviewers} - L_T[Target Branch] - L_P(PR Closed Workflow) - L_S --> L_O --> L_R --> L_T --> L_P - end - - subgraph PRIVATE[Private] - direction TB - P_MAIN[main] - P_DEV[any dev branch] - P_WF_BUILD(build-and-test) - P_REV_MAIN{Review: 1} - P_WF_REL(ensure-release-source pre-release-version-check) - P_REV_REL{Review: 1} - P_REL[release] - P_WF_BACK(back-sync-release-to-main) - P_WF_SYNC(sync-to-public) - end - - subgraph PUBLIC[Public] - direction LR - U_IN[incoming_from_private] - U_REV{Review: 1} - U_REL[release] - U_WF_PUB(publish-to-pypi) - end - - P_MAIN -->|Branch: any| P_DEV - P_DEV -.->|PR Opened: any to main| P_WF_BUILD - P_WF_BUILD -.-> P_REV_MAIN - P_REV_MAIN -->|PR Merged: any to main| P_MAIN - - P_MAIN -.->|PR Opened: main to release| P_WF_REL - P_WF_REL -.-> P_REV_REL - P_REV_REL -->|PR Squashed: main to release| P_REL - - P_REL -.->|Post-merge trigger| P_WF_BACK - P_REL -.->|Post-merge trigger| P_WF_SYNC - P_WF_BACK -.->|Auto back sync release to main| P_MAIN - P_WF_SYNC -.->|Sync release to incoming_from_private| U_IN - - U_IN -.->|PR Opened: incoming_from_private to release| U_REV - U_REV -->|PR Merged incoming_from_private to release| U_REL - U_REL -.->|Post-merge trigger| U_WF_PUB - - classDef branchNode fill:#ffe3e3,stroke:#c01c28,color:#7a0010,stroke-width:2px; - classDef workflowNode fill:#e6f4ff,stroke:#175cd3,color:#0b3b91,stroke-width:2px; - classDef reviewNode fill:#fff4cc,stroke:#b54708,color:#7a2e0e,stroke-width:2px; - classDef markerNode fill:#f5f5f5,stroke:#667085,color:#1f2937; - - class P_MAIN,P_REL,P_DEV,U_REL,U_IN,L_S,L_T branchNode; - class P_WF_BUILD,P_WF_REL,P_WF_BACK,P_WF_SYNC,U_WF_PUB,L_O,L_P workflowNode; - class P_REV_MAIN,P_REV_REL,U_REV,L_R reviewNode; -``` +
+
+
<@f ()8r=AjXyitp%%XJPnb^m3?NSvO6A`eW3mUL1TSwRh*O{w nV6M#uj{S-o
zjsWhg|M)Tudeu97P{X4
z1@!CoEzT@j-R6PuWOE5SRs#fGpT$Mw5&V}#uWot8cb#h60RxeX6xO5d#UT@rT&UJ~
zO#*OC0O&5wne3+Cl1cF{Xx?~wsSAj_sUSk*_q(T#$2s2>jDGi;Zb}t>(`esK-dsNqH{FgcJGwl9%6H>YBKMj+?N4Sl%DT
z#;T+Xz_7ZV>COix`cHXs=e&DP>EGzF{I?J!`p~zK-+L1%30XQ9+f!t4CLzB!6>7qP
z6&bn&qk`qr#Y4G#)+pJ8A~?-?R9>gZIVo1rUkd?aP!Jvl$O5wW6L`QTATL$MD+uff
zHZIM@eKO)Ncd+&66Aekba|P^xJ}D39E@LW;p*;>52Fo!IoE`zaI0u67r%*b*VmTMF
z7{qJv5dJ>A+&!=oA!5&}-O6>~@dPx|15)KF@Z~nj(ag&>t#s}wGL%7{F}va90Q8_i
zx@LtqG{`Y&{v!vHJ4<*p(xwIU=b_A4io#&};YqNqyO0D(i*HDk?p1)iDRr{E=3^CH
zED+>{b}=xCLQy0bQN
k0l$MPYm+jB>=7pw^I3QQp`=g&?}4p1ARA?VwcH
zL76A{0u8vSw%)xp*>(A3EpMlRqT|4DV0F(s(ev}*^|dlZq4Bl?Pf^mAFZ|oQuf_g&
z52rdhne_~hwO^=G`q{=>2yf~iHSeu;`7*