| 1 |
{% extends "base.html" %} |
| 2 |
{% import "repo_tabs.html" as m %} |
| 3 |
{% block title %}New release · {{ 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>New release <small>notes and assets on a signed tag</small></h1></div> |
| 8 |
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %} |
| 9 |
{% if tags.is_empty() %}<p class="empty">This repository has no tags. <code>oxy tag create v1.0 -m "First release"</code> and push, then come back.</p>{% else %} |
| 10 |
<form class="card wide" method="get" action="{{ repo.url }}/releases/new"> |
| 11 |
<div class="row"><div><label for="tag">Tag</label><select id="tag" name="tag" onchange="this.form.submit()">{% for t in tags %}<option value="{{ t }}"{% if *t == tag %} selected{% endif %}>{{ t }}</option>{% endfor %}</select></div></div> |
| 12 |
</form> |
| 13 |
<form class="card wide" method="post" action="{{ repo.url }}/releases/new"> |
| 14 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 15 |
<input type="hidden" name="tag" value="{{ tag }}"> |
| 16 |
<label for="title">Title</label><input type="text" id="title" name="title" value="{{ tag }}"> |
| 17 |
<label for="notes">Notes (drafted from the changes since the previous release)</label><textarea id="notes" name="notes" class="md" rows="14">{{ notes }}</textarea> |
| 18 |
<div class="choice"><label><input type="checkbox" name="prerelease" value="1"> pre-release</label></div> |
| 19 |
<button type="submit">PUBLISH</button> |
| 20 |
</form> |
| 21 |
{% endif %} |
| 22 |
{% endblock %} |