Skip to content

Commit f39ec90

Browse files
Copilotchefgs
andauthored
fix(release): bump version badge in root README.md on every push to main (#52)
* Initial plan * fix: release.yml now bumps version badge in root README.md Co-authored-by: chefgs <7605658+chefgs@users.noreply.github.com> Agent-Logs-Url: https://github.com/cloudengine-labs/devops_os/sessions/a9fa3b36-7d2f-4871-bbe6-db258fa0ba49 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: chefgs <7605658+chefgs@users.noreply.github.com>
1 parent bb0385a commit f39ec90

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,17 @@ jobs:
120120
"s|version-[0-9]+\.[0-9]+\.[0-9]+-blue|version-${NEW_VERSION}-blue|g" \
121121
hugo-docs/content/_index.md
122122
123-
# ── 4. Open a PR with the version-bump changes ────────────────────────
123+
# ── 4. Update version badge in root README ────────────────────────────
124+
- name: Update version badge in root README
125+
env:
126+
NEW_VERSION: ${{ steps.bump.outputs.new_version }}
127+
run: |
128+
# Replace any existing version-X.Y.Z-blue badge with the new version
129+
sed -i -E \
130+
"s|version-[0-9]+\.[0-9]+\.[0-9]+-blue|version-${NEW_VERSION}-blue|g" \
131+
README.md
132+
133+
# ── 5. Open a PR with the version-bump changes ────────────────────────
124134
# peter-evans/create-pull-request creates commits via the GitHub API so
125135
# they are automatically verified (signed), satisfying the branch
126136
# protection rule that requires signed commits. It also opens a PR
@@ -139,16 +149,18 @@ jobs:
139149
140150
- Updates `cli/__version__.py`
141151
- Prepends entry to `CHANGELOG.md`
152+
- Updates version badge in `README.md`
142153
- Updates version badge in `hugo-docs/content/_index.md`
143154
labels: |
144155
release
145156
automated
146157
add-paths: |
147158
cli/__version__.py
148159
CHANGELOG.md
160+
README.md
149161
hugo-docs/content/_index.md
150162
151-
# ── 5. Tag the PR branch's head commit ──────────────────────────────────
163+
# ── 6. Tag the PR branch's head commit ──────────────────────────────────
152164
# Tag the commit on the release branch (not the local main checkout) so
153165
# the tag always points to the exact commit that carries the version bump.
154166
- name: Create and push git tag

0 commit comments

Comments
 (0)