| 1 |
{% extends "base.html" %} |
| 2 |
{% import "repo_tabs.html" as m %} |
| 3 |
{% block title %}Releases · {{ repo.owner }}/{{ repo.name }}{% endblock %} |
| 4 |
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %} |
| 5 |
{% block tabs %}{% call m::tabs(repo, "releases") %}{% endblock %} |
| 6 |
{% block content %} |
| 7 |
<div class="head"><h1>Releases <small>{{ releases.len() }}</small></h1></div> |
| 8 |
{% if !one && repo.can(crate::auth::Access::Write) %} |
| 9 |
<div class="bar"><a class="go small" href="{{ repo.url }}/releases/new">draft a release</a>{% if !unreleased.is_empty() %}<span class="small mute">tags without a release: {% for t in unreleased %}<a href="{{ repo.url }}/releases/new?tag={{ t }}">{{ t }}</a>{% if !loop.last %}, {% endif %}{% endfor %}</span>{% endif %}</div> |
| 10 |
{% endif %} |
| 11 |
{% if releases.is_empty() %}<p class="empty">No releases yet. Tag a state with <code>oxy tag create v1.0 -m "…"</code>, push it, then draft a release here.</p>{% endif %} |
| 12 |
{% for v in releases %} |
| 13 |
<section class="panel release"> |
| 14 |
<h2><a href="{{ repo.url }}/releases/tag/{{ v.r.tag }}">{{ v.r.title }}</a> |
| 15 |
{% if v.latest %}<span class="tag head">latest</span>{% endif %}{% if v.r.prerelease %}<span class="tag warn">pre-release</span>{% endif %} |
| 16 |
<span class="small mute">{{ v.r.tag }}{% if let Some(s) = v.signer %} · <span class="sig sig-valid">✔</span> signed by {{ s }}{% else %} · <span class="sig sig-unsigned">○</span> unsigned tag{% endif %} · {{ v.r.author }} · <time title="{{ v.r.created_ms|when_i }}">{{ v.r.created_ms|ago_i }}</time></span></h2> |
| 17 |
<a class="small" href="{{ repo.url }}/releases/trust/{{ v.r.tag }}" title="Authors, signatures, builds and receipts, audited">Trust and audit</a> |
| 18 |
{% if !v.r.notes.is_empty() %}<article class="doc">{{ v.notes_html|safe }}</article>{% endif %} |
| 19 |
<h3>Assets</h3> |
| 20 |
<ul class="plain"> |
| 21 |
{% for a in v.assets %}<li><a href="{{ repo.url }}/asset/{{ a.id }}/{{ a.name }}">{{ a.name }}</a> <span class="small mute">{{ a.size|bytes }} · blake3 <code title="{{ a.hash }}">{{ a.hash|short }}</code> · {{ a.downloads }} downloads</span>{% if let Some(p) = v.built_by(a.id) %} <span class="small" data-built>· built by <a href="{{ repo.url }}/flow/{{ p.run_number }}">run #{{ p.run_number }}</a> {{ p.job }}{% if p.receipt_attest.is_empty() %} <span class="mute">(unsigned receipt)</span>{% else %} · <a href="{{ repo.url }}/receipts/{{ p.receipt_attest }}" title="Check it with oxy receipt verify">signed receipt</a> by {{ p.receipt_signer }}{% endif %}</span>{% endif %} |
| 22 |
{% if one && repo.can(crate::auth::Access::Write) %}<form class="tiny" method="post" action="{{ repo.url }}/releases/edit/{{ v.r.id }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="asset" value="{{ a.id }}"><button name="action" value="delete_asset">delete</button></form>{% endif %}</li>{% endfor %} |
| 23 |
<li><a href="{{ repo.url }}/archive?ref={{ v.r.tag }}&format=tar.zst">Source ({{ v.r.tag }}.tar.zst)</a></li> |
| 24 |
<li><a href="{{ repo.url }}/archive?ref={{ v.r.tag }}&format=zip">Source ({{ v.r.tag }}.zip)</a></li> |
| 25 |
</ul> |
| 26 |
{% if one && repo.can(crate::auth::Access::Write) %} |
| 27 |
<form class="card" method="post" action="{{ repo.url }}/releases/upload/{{ v.r.id }}" enctype="multipart/form-data"> |
| 28 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 29 |
<label for="asset">Attach files</label><input type="file" id="asset" name="asset" multiple required> |
| 30 |
<button type="submit">UPLOAD</button> |
| 31 |
</form> |
| 32 |
<form class="card wide" method="post" action="{{ repo.url }}/releases/edit/{{ v.r.id }}"> |
| 33 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 34 |
<label for="title">Title</label><input type="text" id="title" name="title" value="{{ v.r.title }}"> |
| 35 |
<label for="notes">Notes</label><textarea id="notes" name="notes" class="md" rows="8">{{ v.r.notes }}</textarea> |
| 36 |
<div class="choice"><label><input type="checkbox" name="prerelease" value="1"{% if v.r.prerelease %} checked{% endif %}> pre-release</label></div> |
| 37 |
<div class="choice"><button type="submit" name="action" value="save">SAVE</button> <button type="submit" name="action" value="delete" class="danger-btn" data-confirm="Delete this release? The tag stays.">DELETE RELEASE</button></div> |
| 38 |
</form> |
| 39 |
{% endif %} |
| 40 |
</section> |
| 41 |
{% endfor %} |
| 42 |
{% endblock %} |