Request
POST https://repopack.com/api/v0/projects/<key>/releases/publish
Authorization: Bearer <token>
Content-Type: application/json
{"product":"rp","version":"1.0.0","job":1,"run":1,"attachments":[]}
Use the preflight to inspect exact Run evidence first. product, version, numeric job and run are required. Optional attachments carry {name, bytes} pairs, attach selects an existing matching canonical tag instead of creating a new one, and promote_to requests an existing immutable-Release channel tip (requiring release.manage in addition to release.write and job.read). An incompatible tag or rolling channel is a conflict, not a reason to silently choose a different channel or Run. Publication creates an immutable version; it is not a Job Run or an App deployment.
Attachment bytes are base64. The full encoded JSON request is limited to
48 MiB, returning 413 above that limit. The decoded attachment limits remain
8 MiB per file, 32 MiB total, and 16 files; a larger reader limit does
not relax publication evidence or attachment validation.
The server holds an API-originated publication for human browser confirmation (428 with guarded_action_id and context_url). After approval it rechecks pinned evidence, tag and channel revision; a stale confirmation returns 409 (release_publication_stale or a specific conflict). Observe the action as described in guarded actions; do not resend publication after a timeout until you inspect the version and action. A duplicate version is refused (409, release_version_exists), not overwritten. The successful confirmed outcome is the published Release presentation. A missing/unreadable project returns 401, insufficient permission 403, and missing product/Job/Run/channel 404.