Skip to content

feat: publish a signed release on tag push - #793

Merged
oc-tmueller merged 2 commits into
masterfrom
feat/signed-release-on-tag
Sep 22, 2026
Merged

oc-tmueller merged 2 commits into
masterfrom
feat/signed-release-on-tag

Conversation

@oc-tmueller

Copy link
Copy Markdown
Contributor

What

  • .github/workflows/release.yml — a Release workflow that fires on any v* tag and
    delegates to
    owncloud/reusable-workflows/.github/workflows/release.yml,
    which verifies the tag against appinfo/info.xml, builds with ocsign as the signer
    and publishes the tarball as a GitHub release.
  • Makefile — prune l10n/.tx from the appstore package before it is signed.

Why

contacts has never had a release pipeline. The newest GitHub release is v1.5.4
(2018) and the marketplace still serves 1.5.5, whose info.xml declares
max-version="10" — so the app cannot be installed on ownCloud 11 (#791). master
already declares 1.6.0 with min-version="11" max-version="11" and PHP 8.3 (#756);
what is missing is a signed release. Signing is mandatory on ownCloud 11+, so the
release has to be produced by a workflow holding the signing key.

No Makefile change is needed for signing

The appstore target already gates signing on ifdef CAN_SIGN and calls
$(sign) --path=…; the reusable workflow overrides both on the make command
line, substituting ocsign for occ integrity:sign-app. Unlike calendar (#1367),
this Makefile has no occ config shuffle to remove.

Why artifact-glob is narrowed

make dist also builds build/artifacts/source/contacts.tar.gz from the whole
working tree. Both tarballs are named contacts.tar.gz, so they would collide as
release assets — and the source one carries 20 entries under tests/, .github/ and
vendor-bin/, which the workflow's development-files assertion rejects outright.
Verified locally:

$ tar tzf build/artifacts/source/contacts.tar.gz | grep -cE '^[^/]+/(\.git|\.github|tests|build|vendor-bin)/'
20
$ tar tzf build/artifacts/appstore/contacts.tar.gz | grep -cE '^[^/]+/(\.git|\.github|tests|build|vendor-bin)/'
0

Why l10n/.tx is pruned

appstore copies l10n wholesale, so the tracked l10n/.tx/config ends up inside the
packaged app. Nothing published that artifact before, so it was harmless; now that a tag
push signs and releases it, the file would be covered by appinfo/signature.json and an
administrator could not delete it without breaking occ integrity:check-app. That is the
failure mode owncloud/core#41824 was about. The workflow's development-files check greps
only for .git, .github, tests, build and vendor-bin, so it would not have caught
this. firewall's appstore target prunes the same directory the same way, and the prune
runs before $(sign).

Verification

make appstore in a php8.3/node22 container, with a stub signer so the recipe is
exercised end to end:

$ make appstore CAN_SIGN=true sign="echo WOULD-SIGN"
...
rm -Rf …/build/artifacts/appstore/contacts/l10n/.tx
WOULD-SIGN --path=…/build/artifacts/appstore/contacts
tar -czf …/build/artifacts/appstore/contacts.tar.gz -C …/build/artifacts/appstore/contacts/../ contacts

Reaches the tar step and touches no config. The tarball has 192 entries, 110 of them
under l10n/, no .tx, and no development files. The local developer path via
occ integrity:sign-app is unaffected.

Prerequisite before tagging

SIGNING_KEY / SIGNING_CERT / SIGNING_CHAIN do not exist on this repo yet — contacts
was left out of the 2026-07-28 rollout and has no code-signing certificate at all. Until
they are set, a tag push fails at the workflow's "Check signing secrets are present" step
rather than publishing an unsigned release. Enrollment is under way:
owncloud/developer-certificates#83, challenge file in #792.

@oc-tmueller
oc-tmueller requested a review from a team as a code owner September 22, 2026 15:40
@CLAassistant

CLAassistant commented Sep 22, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Adds a Release workflow that fires on any v* tag and delegates to the
shared reusable release workflow, which verifies the tag against
appinfo/info.xml, builds with ocsign as the signer and publishes the
resulting tarball as a GitHub release.

contacts has never had a release pipeline: the newest GitHub release is
v1.5.4 (2018) and the marketplace still serves 1.5.5, which declares
max-version="10" and therefore cannot be installed on ownCloud 11
(#791). Signing is mandatory on ownCloud 11+, so the release has to be
produced by a workflow holding the signing key.

No Makefile change is needed. The appstore target already gates signing
on CAN_SIGN and calls $(sign) --path=...; the reusable workflow
overrides both on the make command line.

artifact-glob is deliberately narrowed to the appstore tarball. "make
dist" also builds build/artifacts/source/contacts.tar.gz from the whole
working tree - 20 entries under tests/, .github/ and vendor-bin/ - which
the workflow's development-files assertion rejects, and both tarballs
are named contacts.tar.gz so they would collide as release assets.

Signed-off-by: Thomas Müller <[email protected]>
The appstore target copies l10n wholesale, so l10n/.tx/config - which is
tracked in git - ends up inside the packaged app. Nothing published that
artifact before, so it was harmless; now that a tag push signs and
releases it, the file would be covered by appinfo/signature.json and an
administrator could not delete it without breaking
`occ integrity:check-app`. That is the failure mode owncloud/core#41824
was about.

firewall's appstore target prunes the same directory the same way.

Signed-off-by: Thomas Müller <[email protected]>
@oc-tmueller
oc-tmueller merged commit ce8869c into master Sep 22, 2026
11 checks passed
@oc-tmueller
oc-tmueller deleted the feat/signed-release-on-tag branch September 22, 2026 21:29
oc-tmueller added a commit that referenced this pull request Sep 22, 2026
Cuts 1.6.0, the first release since 1.5.5 (2018-12-11).

- CHANGELOG.md: [Unreleased] closed out as [1.6.0], link refs updated
- sonar-project.properties: sonar.projectVersion 1.0 -> 1.6.0
- package.json: version 1.5.4 -> 1.6.0, two releases behind

appinfo/info.xml needs no change - it already declares 1.6.0, bumped in
5c9b81e along with the min-version/max-version 11 dependency and the
PHP 8.3 requirement, but never tagged. The release workflow added by
#793 enforces that the tag matches <version>.

Dropping ownCloud 10 and PHP < 8.3 gets its own Removed section rather
than a bullet in the middle of Changed: it is the one fact in this
changelog that can leave an administrator with a disabled app after an
upgrade, so it should not be easy to skim past. For the same reason #775
is under Security rather than Fixed - it replaces a bundled XML parser
carrying unpatched advisories, and reads as a rename otherwise.

The #794 entry says explicitly that the regression it fixes never
reached a release. 1.5.5 predates #775 by eight years, so without that
note an administrator reading these release notes would conclude their
current install has a broken contact list and treat 1.6.0 as urgent.

The dependency line names the development toolchain explicitly: every
package.json change since 1.5.5 was a devDependency. The one bundled
runtime library that does move is @xmldom/xmldom, via #794, and that is
called out on its own line.

Signed-off-by: Thomas Müller <[email protected]>
oc-tmueller added a commit that referenced this pull request Sep 23, 2026
…ng (#798)

The release workflow has never executed: no tag has been pushed since it
landed in #793. The first run would therefore be the real v1.6.0 tag,
which is a poor place to find out that ocsign will not build, that a
signing secret is malformed, or that `make dist` behaves differently on
ubuntu-latest than in a local container.

The reusable workflow already takes a `dry-run` input that skips the
tag-vs-info.xml check and the release creation and uploads the tarball as
a workflow artifact instead, but nothing in the org has ever used it -
every release.yml caller is tag-push only, so it was unreachable here.

Adds workflow_dispatch and derives dry-run from the ref. The condition is
written as the positive invariant "only a push of a v-tag publishes"
rather than "a dispatch is a dry run", so that a trigger added here later
cannot inherit real-release behaviour by default: a `push: branches:
['v*']` would otherwise publish a release from a branch head. A dispatch
never publishes, including a dispatch against a tag. A v-tag push is
unaffected.

inputs.dry-run is not used because on a tag push the inputs context is
empty, and passing '' to the callee's boolean input is an error.

What a dispatch then exercises, per the callee: the signing-secret
presence check (not gated by dry-run), the ocsign build, `make dist` with
CAN_SIGN, the schema-v2 / leaf-CN signature assertions, and the
development-files assertion. Only the tag check and release creation are
skipped.

Note that workflow_dispatch is only offered once the trigger is on the
default branch, so the first rehearsal is possible after this merges -
this branch cannot rehearse itself.

Signed-off-by: Thomas Müller <[email protected]>
Co-authored-by: Thomas Müller <[email protected]>
oc-tmueller added a commit that referenced this pull request Sep 23, 2026
Cuts 1.6.0, the first release since 1.5.5 (2018-12-11).

- CHANGELOG.md: [Unreleased] closed out as [1.6.0], link refs updated
- sonar-project.properties: sonar.projectVersion 1.0 -> 1.6.0
- package.json: version 1.5.4 -> 1.6.0, two releases behind

appinfo/info.xml needs no change - it already declares 1.6.0, bumped in
5c9b81e along with the min-version/max-version 11 dependency and the
PHP 8.3 requirement, but never tagged. The release workflow added by
#793 enforces that the tag matches <version>.

Dropping ownCloud 10 and PHP < 8.3 gets its own Removed section rather
than a bullet in the middle of Changed: it is the one fact in this
changelog that can leave an administrator with a disabled app after an
upgrade, so it should not be easy to skim past. For the same reason #775
is under Security rather than Fixed - it replaces a bundled XML parser
carrying unpatched advisories, and reads as a rename otherwise.

The #794 entry says explicitly that the regression it fixes never
reached a release. 1.5.5 predates #775 by eight years, so without that
note an administrator reading these release notes would conclude their
current install has a broken contact list and treat 1.6.0 as urgent.

The dependency line names the development toolchain explicitly: every
package.json change since 1.5.5 was a devDependency. The one bundled
runtime library that does move is @xmldom/xmldom, via #794, and that is
called out on its own line.

Signed-off-by: Thomas Müller <[email protected]>
Co-authored-by: Thomas Müller <[email protected]>
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.

3 participants