From 96477bd7b0b0496974f5ab1ebe071210591ebb79 Mon Sep 17 00:00:00 2001 From: tada5hi Date: Tue, 4 Aug 2026 20:59:42 +0200 Subject: [PATCH] ci: add a dispatchable release and keep the README version in sync Two independent failures broke the 0.2.0 release. The publish job died in hevi with "422 Invalid target_commitish parameter": chart-releaser posts an empty target_commitish unless --commit is passed, which hevi never did (tada5hi/hevi#60, fixed by tada5hi/hevi#61). Publishing was only reachable from a master push, so there was no way to retry it once the version bump had already been merged. The release workflow now also accepts a workflow_dispatch, with release-please skipped on that path, and a concurrency group so a manual run cannot race a push. The lint job died on helm-docs drift: release-please bumps Chart.yaml but not the generated README, whose badge still advertised 0.1.0. The README is now a release-please extra-file. Its generic updater rewrites only the first semver on an annotated line, so the version badge is hand-rolled to carry the version exactly once and to terminate it with "?" instead of the "-informational" color segment, which the updater would otherwise swallow as a prerelease suffix. --- .github/workflows/release.yaml | 10 ++++++++++ charts/authup/README.md | 3 ++- charts/authup/README.md.gotmpl | 14 +++++++++++++- release-please-config.json | 5 ++++- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 13af9c8..cf8b920 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,6 +4,12 @@ on: push: branches: - master + # Re-run the publish step for whatever Chart.yaml currently holds, without a new + # commit: the recovery path when a publish failed on its own (a broken releaser, + # an API hiccup) after release-please already merged the version bump. + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} permissions: contents: write @@ -13,6 +19,7 @@ permissions: jobs: release-please: runs-on: ubuntu-latest + if: github.event_name == 'push' steps: - uses: googleapis/release-please-action@v4 id: release @@ -28,6 +35,9 @@ jobs: publish: runs-on: ubuntu-latest needs: release-please + # release-please is skipped on workflow_dispatch, and a skipped dependency + # would skip this job too without an explicit condition. + if: ${{ !cancelled() && needs.release-please.result != 'failure' }} steps: - name: Checkout uses: actions/checkout@v4 diff --git a/charts/authup/README.md b/charts/authup/README.md index 878b820..0280f29 100644 --- a/charts/authup/README.md +++ b/charts/authup/README.md @@ -6,7 +6,8 @@ # authup -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0-beta.58](https://img.shields.io/badge/AppVersion-1.0.0--beta.58-informational?style=flat-square) +![Version](https://img.shields.io/badge/Version-0.2.0?style=flat-square&color=informational) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0-beta.58](https://img.shields.io/badge/AppVersion-1.0.0--beta.58-informational?style=flat-square) Authup is an authentication & authorization system. This chart deploys the server-core IdP/API service and the client-admin-console admin UI, with optional built-in PostgreSQL, MySQL and Valkey instances. It deploys: diff --git a/charts/authup/README.md.gotmpl b/charts/authup/README.md.gotmpl index 9eed8f4..fdc2027 100644 --- a/charts/authup/README.md.gotmpl +++ b/charts/authup/README.md.gotmpl @@ -8,7 +8,19 @@ {{ template "chart.deprecationWarning" . }} -{{ template "chart.badgesSection" . }} +{{/* + The version badge is hand-rolled instead of using chart.badgesSection, because + release-please has to keep it in sync with Chart.yaml (it is listed as an + extra-file). Two constraints come from its generic updater, which rewrites only + the FIRST semver on an annotated line: + 1. the version may appear exactly once here, so the appVersion badge has to + live on a separate line + 2. the version has to be terminated by "?", not by the usual "-informational" + color segment, which the updater would otherwise swallow as a semver + prerelease suffix and drop +*/}} +![Version](https://img.shields.io/badge/Version-{{ template "chart.version" . }}?style=flat-square&color=informational) +{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} {{ template "chart.description" . }} It deploys: diff --git a/release-please-config.json b/release-please-config.json index 46eb2c2..f1232b8 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -8,7 +8,10 @@ "charts/authup": { "component": "authup", "release-type": "helm", - "skip-github-release": true + "skip-github-release": true, + "extra-files": [ + "README.md" + ] } } }