Skip to content

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

Closed

Description

@gnacho

Problem

Release assets can be published with a version inside manifest.json that does not match the tag. Measured in the current tags:

Tag extension/package.json at that commit Version inside the published zip
notes-v0.1.6 0.1.4 0.1.4
news-v0.1.8 0.1.0 0.1.0
news-v0.2.0 0.1.0 0.1.0
ocphotos-v1.2.0 1.1.0 1.1.0
ocphotos-v1.4.0 1.1.0 1.1.0

release.yml derives the zip file name from the tag but the manifest comes from the build, which reads package.json. OpenCloud builds its external_apps list from those manifests at service start, so a mismatch shows the wrong version in the apps menu and, in the worst case, points at an entrypoint that is not in the folder. This is what #49 reported for notes-0.1.6.

Current latest of the three apps is consistent, so the exposure is limited to older tags.

Proposal

In release.yml, before packaging: fail the job when the tag version (${TAG##*-v}) differs from extension/package.json version. One jq/node -p comparison, no new actions.

Acceptance

Pushing a tag whose package.json version does not match makes the release run fail with a clear message instead of publishing a zip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions