Skip to content

ci: fail the release when the tag and the manifest disagree - #58

Merged
gnacho merged 1 commit into
mainfrom
ci/56-tag-version-gate
Nov 12, 2026
Merged

gnacho merged 1 commit into
mainfrom
ci/56-tag-version-gate

Conversation

@gnacho

@gnacho gnacho commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Two guards in release.yml, because the file name and the manifest came from different sources:

  1. After setup-node, before installing: the tag version must equal extension/package.json. Fails in seconds, with an annotation naming both values.
  2. Inside the packaging step, after the build: extension/dist/manifest.json must equal the tag. This validates the artefact that actually gets zipped, so it still holds if the manifest source ever changes.

Why both: the first catches the mistake before spending a build, the second catches any path where the built manifest disagrees regardless of the input.

Why this exists

notes-v0.1.6 shipped notes-0.1.6.zip containing a manifest with "version": "0.1.4", because extension/package.json was still at 0.1.4 on that commit. The workflow took the zip name from the tag and the version inside from the build. OpenCloud builds external_apps from the manifests at service start, so the apps menu showed 0.1.4. Reported by a user in #49.

Verification

Both guards were executed locally against the real repository state, not just written:

  • tag notes-v0.1.7 with package.json 0.1.7 -> passes (exit 0)
  • tag notes-v0.1.6 with package.json 0.1.7 -> fails (exit 1), which is the exact case that published the broken asset
  • after a real npm run build, dist/manifest.json says 0.1.7: tag 0.1.7 passes, tag 0.1.99 fails

The workflow itself only runs on tag pushes, so its first real execution will be the next release. The YAML was parsed with a strict loader to confirm the step list is what it should be.

Closes #56

The zip name came from the tag and the manifest from extension/package.json, so notes-v0.1.6 shipped a 0.1.4 manifest. Two guards: the tag against package.json before installing, and the built dist/manifest.json against the tag before publishing. Closes #56
@gnacho
gnacho merged commit 99893b4 into main Nov 12, 2026
4 checks passed
@gnacho
gnacho deleted the ci/56-tag-version-gate branch November 12, 2026 06:45
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.

release.yml: fail when the tag version does not match extension/package.json

1 participant