feat: publish releases to the Nextcloud App Store

Draft
AS
3d ago
+163-0

Goal

Publish releases of this app to https://apps.nextcloud.com.

What this PR does

1. Wire the release pipeline to publish to the App Store

Adds a step to the build job in .github/workflows/release.yml that, after the GitHub release assets are attached, signs the release archive and uploads it to the App Store via R0Wi/nextcloud-appstore-push-action (pinned to a commit SHA, per repo convention).

The step is gated on both secrets and skips with a ::notice:: when either is absent — so the release pipeline keeps working before the one-time setup is done.

2. Document the one-time setup

New docs/APPSTORE.md covering: generating the signing key + CSR, getting the certificate signed via nextcloud/app-certificate-requests, registering the app id, adding the secrets, and a manual publish fallback.

Required one-time setup (repository owner)

These cannot be done from code — they need the app owner's certificate and account:

  1. Generate the private key + CSR (keep the key secret).
  2. Open a PR with cad_viewer/cad_viewer.csr to https://github.com/nextcloud/app-certificate-requests.
  3. Register the app id at https://apps.nextcloud.com using the signed certificate + a signature over cad_viewer.
  4. Add repository secrets:
    • APP_PRIVATE_KEY — the private key
    • APPSTORE_TOKEN — the App Store API token (My account → API-Token)

Full steps are in docs/APPSTORE.md.

Recent updates

Rebased onto current main (was 204 commits behind) and addressed the open review feedback:

  • Dropped the appinfo/info.xml change. It removed the <screenshot> element because docs/screenshot.png returned 404 at this branch's old base (0.6.7). main has since added the image (8c368c48d) and re-added the element, and the URL now returns 200 — so removing it would regress a working App Store listing. The file now matches main.
  • Fixed the manual-publish signature command (CodeRabbit (below)). openssl base64 wraps at 64 columns by default; pasted into the JSON body that produces invalid control characters and the request fails to parse. Both examples now use -A for a single-line signature, with a note about the terminal copy-paste pitfall.

Verification

  • release.yml parses as valid YAML; the publish step sits in the build job and only runs when both secrets exist.
  • Verified openssl base64 wraps at 64 columns and -A emits a single 344-char line; confirmed the wrapped form yields Invalid control character when parsed as JSON, while -A parses cleanly.
  • appinfo/info.xml validates against the App Store schema (lint-info-xml workflow).

Notes

  • The app is not yet registered on the App Store, so steps 1–4 above must be completed before a release will publish.
  • Once the secrets are set, the next tagged release publishes automatically.

This PR was created by an AI agent (OpenHands) on behalf of the repository maintainer.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were established.

Summary

Adds optional publishing to the Nextcloud App Store after the GitHub release is public.

  • Tagged releases can reach the Nextcloud App Store when credentials are set.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Create release tag and draft] --> B[Build and check archives]
  B --> C[Attach archives and publish GitHub release]
  C --> D{Both secrets set?}
  D -->|Yes| E[Publish to Nextcloud App Store]
  D -->|No| F[Skip with notice]

Reviews (2) · Last reviewed commit: "docs(appstore): use single-line signatur..." · Reviewed by Greptile


This change is Reviewable

Summary by Sourcery

Enable releases to be published to the Nextcloud App Store while preserving successful releases before App Store credentials are configured.

New Features:

  • Add optional automatic publishing of tagged releases to the Nextcloud App Store when the required credentials are configured.

Enhancements:

  • Skip App Store publishing with a notice when credentials are unavailable or the workflow is running in dry-run mode.

Documentation:

  • Document App Store certificate setup, app registration, repository secrets, automated publishing, and manual release uploads.

Summary by CodeRabbit

  • New Features

    • Releases can now be published to the Nextcloud App Store when publishing credentials are configured. If credentials are unavailable, App Store publishing is skipped.
  • Documentation

    • Added guidance for preparing and publishing an app release to the Nextcloud App Store, including setup requirements and manual upload instructions.