Skip to content

Unify release workflow behind one vX.Y.Z tag - #82

Merged
luispabon merged 4 commits into
mainfrom
unified-release
Nov 24, 2026
Merged

luispabon merged 4 commits into
mainfrom
unified-release

Conversation

@luispabon

Copy link
Copy Markdown
Collaborator

Summary

Replaces the split Docker and Helm chart release pipelines with one tag-driven workflow. Nothing publishes when a change merges to main.

Pushing a strict vX.Y.Z tag now runs, in order:

  1. verify: strict tag regex (^v[0-9]+\.[0-9]+\.[0-9]+$), tag commit must be an ancestor of origin/main, Chart.yaml version and appVersion must equal the tag, then lint, tests, Helm lint and template.
  2. image: multi-arch Docker push tagged X.Y.Z, X.Y, X, latest, with a gha build cache.
  3. chart: package and merge into gh-pages/index.yaml with helm repo index --merge (relative URLs kept), skip a version already listed, publish Artifact Hub metadata in the same commit.
  4. release: GitHub Release with generated notes, guarded so re-runs are safe.

workflow_dispatch publishes only artifacthub-repo.yml and .nojekyll to gh-pages; it never builds an image or chart.

Other changes

  • Drop helm/chart-releaser and delete chart-release.yaml. No more readability-js-server-X.Y.Z tags or releases.
  • Rename build-publish.yaml to ci.yaml; CI adds an amd64 docker build smoke step with no push.
  • CodeQL scans javascript-typescript and actions without autobuild.
  • make release-tag refuses to tag unless the tree is clean, HEAD matches origin/main, VERSION is strict MAJOR.MINOR.PATCH, and the chart fields match.
  • Docs updated for the matching-version policy: version == appVersion == tag, and chart-only fixes need a new patch tag.

Verification

  • npm run lint, npm test (36 pass), make helm-verify, actionlint, shellcheck: pass.
  • Live index.yaml dry run: existing entries keep their created, digest and relative URLs, and an already-published version is never re-packaged or re-digested.
  • Tag validation dry runs cover malformed tags, off-main commits, annotated tags and mismatched chart versions.

Rollout

  • First run of the new flow is v2.0.4; the chart job skips packaging because 2.0.4 is already in index.yaml.
  • Old readability-js-server-* releases and tags are deleted manually after that run, once the .tgz URLs are confirmed.

- git mv build-publish.yaml to ci.yaml and add a final
  docker build --platform linux/amd64 step (no push)
- rewrite codeql-analysis.yml: explicit javascript-typescript, actions
  languages, drop autobuild and boilerplate comments
- harden make release-tag: strict MAJOR.MINOR.PATCH VERSION, clean tree,
  HEAD equal to origin/main, and Chart.yaml version/appVersion match
  before tagging
Replace release.yaml with a verify -> image -> chart -> release chain plus
a workflow_dispatch-only metadata job, and drop chart-release.yaml.

- verify: strict vMAJOR.MINOR.PATCH tag, tag commit must be on origin/main,
  Chart.yaml version/appVersion must match, then lint/test/helm checks
- image: multi-arch build with gha cache, latest/VERSION/MAJOR.MINOR/MAJOR
- chart: package, merge into gh-pages index.yaml (skipped when the version
  is already listed), publish chart + Artifact Hub metadata in one commit
- release: GitHub Release guarded by `gh release view` so re-runs are safe
- metadata: workflow_dispatch publishes artifacthub-repo.yml + .nojekyll only
- .github/scripts/publish-gh-pages.sh: shared commit/push helper that is a
  no-op when nothing changed
One strict vX.Y.Z tag now publishes Docker images, the Helm chart and
index.yaml on gh-pages, Artifact Hub metadata, then the GitHub Release.
Chart version and appVersion must both match the tag, merging to main
publishes nothing, and workflow_dispatch only republishes Artifact Hub
metadata.
…e lazily

- verify/image/chart/release now require event_name == 'push', so a
  workflow_dispatch aimed at a tag ref cannot publish image, chart, or release
- verify resolves the tag to its commit with `rev-parse <tag>^{commit}` before
  the ancestry check, so annotated tags are compared by commit, not tag object
- chart job drops the separate package step: the version check now runs first
  against index.yaml (awk exact match, fails loudly when index.yaml is absent)
  and packaging only happens when the version is new
@luispabon
luispabon merged commit 807e2ff into main Nov 24, 2026
3 checks passed
@luispabon
luispabon deleted the unified-release branch November 24, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant