Skip to content

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

Merged
DeepDiver1975 merged 1 commit into
masterfrom
feat/release-workflow
Jul 28, 2026
Merged

feat: publish a signed release on tag push#564
DeepDiver1975 merged 1 commit into
masterfrom
feat/release-workflow

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Jul 28, 2026

Copy link
Copy Markdown
Member

What

Adds a Release workflow: on a v* tag push, make dist runs, the bundle is
signed, and the tarball is attached to a GitHub Release. Delegates to
owncloud/reusable-workflows.

Why

make dist in CI has been silently producing unsigned tarballs. CAN_SIGN
is only set when key, cert and occ all exist locally, so the else branch
just echoes a message and the build still exits 0:

$ make dist
Skipping signing, either no key and certificate found in ... or occ can not be found
$ tar tzf build/<app>.tar.gz | grep -c signature.json
0
$ echo $?
0

Signing is mandatory on ownCloud 11+ — an unsigned app is blocked, not
warned. Signing now uses ocsign, which
needs no ownCloud server, and the reusable workflow asserts the tarball
carries a valid appinfo/signature.json whose leaf CN matches the app id.

Two Makefile changes this app needs

The configdir workaround is removed. appstore: moved
../../config/config.php aside around the sign call, so occ would not read
the app's own config. ocsign reads no config, and without a core checkout that
path does not exist, so the mv failed outright:

mv: cannot stat '.../notes/../../config/config.php': No such file or directory
make[1]: *** [Makefile:157: appstore] Error 1

Both lines are gone, which leaves configdir unreferenced, so its definition
goes too. Verified: with the patch, make dist signs and tars cleanly.

artifact-glob is narrowed. make dist emits two tarballs, both named
notes.tar.gzbuild/artifacts/source/ and build/artifacts/appstore/. As
release assets they would collide, so only the appstore bundle is published.

Before this can publish

The SIGNING_KEY, SIGNING_CERT and SIGNING_CHAIN secrets must be set on
this repository. Without them the release job fails fast with a clear message
rather than shipping something unsigned.

The workflow also requires the pushed tag (minus the leading v) to equal
<version> in appinfo/info.xml.

🤖 Generated with Claude Code

Adds a Release workflow that delegates to owncloud/reusable-workflows. On a
`v*` tag push it runs `make dist`, signs the bundle with ocsign instead of
`occ integrity:sign-app` (no ownCloud server required) and attaches the
tarball to a GitHub Release.

Until now `make dist` in CI silently skipped signing: `CAN_SIGN` is only set
when key, cert and occ all exist locally, so the `else` branch just echoed a
message and the build still exited 0. Since signing is mandatory on
ownCloud 11+, the reusable workflow now asserts the tarball carries a valid
`appinfo/signature.json` and fails the release otherwise.

Two Makefile changes are needed for this app:

The `appstore` target moved `../../config/config.php` aside around the sign
call, to stop occ reading the app's own config. ocsign does not read any
config, and without a core checkout that path does not exist, so the `mv`
failed with "cannot stat". Both lines are removed, which leaves `configdir`
unused, so its definition goes too.

`make dist` also emits two tarballs that are both named `notes.tar.gz` (a
source and an appstore bundle), which would collide as release assets, so the
workflow narrows `artifact-glob` to the appstore one.

Requires the SIGNING_KEY, SIGNING_CERT and SIGNING_CHAIN secrets on this
repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 requested a review from a team as a code owner July 28, 2026 12:02
@DeepDiver1975
DeepDiver1975 merged commit f237d99 into master Jul 28, 2026
14 checks passed
@DeepDiver1975
DeepDiver1975 deleted the feat/release-workflow branch July 28, 2026 14:40
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.

2 participants