Skip to content

Commit 869f413

Browse files
committed
fix(release): ensure root package is always marked as latest
Add explicit make-latest: true to root package config and a mark-latest workflow job that re-asserts the latest pointer on the root tag after all sub-package releases are created, preventing ordering races.
1 parent 3036c8a commit 869f413

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/release-please-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
".": {
1010
"component": "deepctl",
1111
"include-component-in-tag": false,
12+
"make-latest": true,
1213
"extra-files": [
1314
"src/deepctl/__init__.py"
1415
]

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,22 @@ jobs:
7777
pip install --find-links "$DIST_DIR" dist/deepctl-*.whl
7878
deepctl --version
7979
80+
mark-latest:
81+
name: Mark root release as latest
82+
needs: release-please
83+
# Re-assert latest on the root package tag (vX.Y.Z) after all sub-package
84+
# releases are created, since release-please processes them sequentially and
85+
# a sub-package release created after the root tag can steal the pointer.
86+
if: |
87+
needs.release-please.outputs.release_created == 'true' &&
88+
startsWith(needs.release-please.outputs.tag_name, 'v')
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: Mark root release as latest
92+
run: gh release edit "${{ needs.release-please.outputs.tag_name }}" --latest --repo "${{ github.repository }}"
93+
env:
94+
GH_TOKEN: ${{ github.token }}
95+
8096
deploy-web:
8197
name: Deploy web to production
8298
needs: release-please

0 commit comments

Comments
 (0)