{% extends "projects_shell.html" %} {% from "_macros.html" import icon, ref %} {% from "_release_macros.html" import release_line %} {% block tab %}

Release

{{ folder.local_path | home }}
{% if release_error %}

{{ icon("alert") }}{{ release_error }}

{% endif %} {% if error %}

{{ icon("alert") }}.apo/release.toml: {{ error }}

{% elif not recipe %}

{{ icon("info") }}This folder has no .apo/release.toml saying how it releases. The guide shows what goes in one.

{% if setup %}

{{ icon("zap") }}Being set up: {{ ref(setup.id) }}{{ setup.title }}

{% else %}

Files a task for an agent: work out where this ships, write the recipe and the release workflow, and file what only you can do (registry and secret settings) as actions.

{% endif %} {% else %} {% if running %}

{{ icon("info") }}{{ release_line(running) }}. A folder releases one at a time.

{% endif %}

Version

Now {{ plan.current }}{% if shipping.since %}; the last release was tagged {{ shipping.since }}{% endif %}.

{% if ready %}

Merge first

    {% for b in ready %}
  • {% endfor %}

Ticked branches with finished work are merged into the release. A conflict stops it.

{% endif %}

What ships

{% if shipping["items"] %} {% endif %} {% if shipping.commits %}
{{ shipping.commits | length }} commit{{ "s" if shipping.commits | length != 1 }} since {{ shipping.since or "the start" }}
    {% for c in shipping.commits %}
  • {{ c.short }} {{ c.subject }}
  • {% endfor %}
{% elif not shipping["items"] %}

Nothing new on {{ plan.branch }} since {{ shipping.since or "the start" }}{% if ready %}, apart from the branches above{% endif %}.

{% endif %}

They go in the release commit and the tag.

What it does

  1. Checks that {{ plan.branch }} has no uncommitted changes and isn't behind {{ plan.remote }}/{{ plan.branch }}
  2. {% if ready %}
  3. Merges the ticked branches
  4. {% endif %}
  5. Sets the version to {{ plan.next }} in {{ plan.files | join(", ") }} and commits “Release {{ plan.next }}”
  6. {% if plan.test %}
  7. Runs {{ plan.test }}
  8. {% else %}
  9. Runs no tests: the recipe has no test
  10. {% endif %}
  11. Moves {{ plan.branch }} to the release, tags it {{ plan.tag }}, and pushes both to {{ plan.remote }}{% if plan.workflow %}, which starts {{ plan.workflow }}{% endif %}
  12. {% for t in plan.targets if t.publish_here %}
  13. Publishes {{ t.label | replace("npm: ", "") }} to npm from here with {{ t.publish_here | join(" ") }}. If your npm account uses a security key, the release page shows a link to confirm in, and waits for you.
  14. {% endfor %} {% for t in plan.targets if t.install %}
  15. Installs {{ plan.tag }} into {{ t.label | replace("Installed copy: ", "") }}{% if t.restart_dashboard %}, then restarts this dashboard{% endif %}
  16. {% endfor %}
{% set published = plan.targets | selectattr("check") | list %} {% if published %}

Lands on {{ published | map(attribute="label") | join(", ") }}.

{% endif %}

Everything up to the push happens in a scratch checkout: if a step fails, {{ plan.branch }} is left as it was.

{% if problems %}
    {% for problem in problems %}
  • {{ icon("alert") }}{{ problem }}
  • {% endfor %}
{% endif %}
{% endif %}
{% if releases %}

Earlier releases

{% endif %}
{% endblock %}