diff --git a/cumulus/.github/workflows/release-02_create-draft.yml b/cumulus/.github/workflows/release-02_create-draft.yml index 5fb4dff79a..cded2e1e5d 100644 --- a/cumulus/.github/workflows/release-02_create-draft.yml +++ b/cumulus/.github/workflows/release-02_create-draft.yml @@ -1,4 +1,4 @@ -name: Publish draft release +name: Release - Create draft on: workflow_dispatch: @@ -138,6 +138,15 @@ jobs: cd cumulus/scripts/changelog ./bin/changelog $REF1 $REF2 release-notes.md ls -al release-notes.md + ls -al context.json + + - name: Archive artifact context.json + uses: actions/upload-artifact@v2 + with: + name: release-notes-context + path: | + context.json + **/*_srtool_output.json - name: Create draft release id: create-release diff --git a/cumulus/scripts/changelog/bin/changelog b/cumulus/scripts/changelog/bin/changelog index 4b2fa30969..33650787e1 100755 --- a/cumulus/scripts/changelog/bin/changelog +++ b/cumulus/scripts/changelog/bin/changelog @@ -80,7 +80,7 @@ SHELL_DIGEST = ENV['SHELL_DIGEST'] || 'digests/shell-srtool-digest.json' WESTMINT_DIGEST = ENV['WESTMINT_DIGEST'] || 'digests/westmint-srtool-digest.json' STATEMINE_DIGEST = ENV['STATEMINE_DIGEST'] || 'digests/statemine-srtool-digest.json' STATEMINT_DIGEST = ENV['STATEMINT_DIGEST'] || 'digests/statemint-srtool-digest.json' -ROCOCO_DIGEST = ENV['ROCOCO_DIGEST'] || 'digests/rococo-parachain-srtool-digest.json' +ROCOCO_PARA_DIGEST = ENV['ROCOCO_PARA_DIGEST'] || 'digests/rococo-parachain-srtool-digest.json' # Here we compose all the pieces together into one # single big json file. @@ -92,13 +92,13 @@ cmd = format('jq \ --slurpfile srtool_westmint %s \ --slurpfile srtool_statemine %s \ --slurpfile srtool_statemint %s \ - --slurpfile srtool_rococo %s \ + --slurpfile srtool_rococo_parachain %s \ -n \'{ cumulus: $cumulus[0], substrate: $substrate[0], polkadot: $polkadot[0], srtool: [ - { name: "rococo", data: $srtool_rococo[0] }, + { name: "rococo", data: $srtool_rococo_parachain[0] }, { name: "shell", data: $srtool_shell[0] }, { name: "westmint", data: $srtool_westmint[0] }, { name: "statemint", data: $srtool_statemint[0] }, @@ -108,7 +108,7 @@ cmd = format('jq \ WESTMINT_DIGEST, STATEMINE_DIGEST, STATEMINT_DIGEST, - ROCOCO_DIGEST) + ROCOCO_PARA_DIGEST) system(cmd) cmd = format('tera --env --env-key env --include-path templates \ diff --git a/cumulus/scripts/changelog/templates/changes_misc.md.tera b/cumulus/scripts/changelog/templates/changes_misc.md.tera index f956e0f7b1..7585eb8bc5 100644 --- a/cumulus/scripts/changelog/templates/changes_misc.md.tera +++ b/cumulus/scripts/changelog/templates/changes_misc.md.tera @@ -17,8 +17,8 @@ ### Misc {% if misc_count > 10 %} -There are {{ misc_count }} other misc. changes. You can expand the list below to view them all. -
{{ misc_count }} misc. changes +There are other misc. changes. You can expand the list below to view them all. +
Other misc. changes {% endif -%} {#- The changes are sorted by merge date #} diff --git a/cumulus/scripts/changelog/templates/docker_image.md.tera b/cumulus/scripts/changelog/templates/docker_image.md.tera index f28a6d54b0..59f631106b 100644 --- a/cumulus/scripts/changelog/templates/docker_image.md.tera +++ b/cumulus/scripts/changelog/templates/docker_image.md.tera @@ -4,6 +4,7 @@ The docker image for this release can be found in [Docker hub](https://hub.docker.com/r/parity/polkadot-collator/tags?page=1&ordering=last_updated). You may also pull it with: + ``` docker pull parity/polkadot-collator:latest ``` diff --git a/cumulus/scripts/changelog/templates/global_priority.md.tera b/cumulus/scripts/changelog/templates/global_priority.md.tera index e0731122ad..f8e2d8ddea 100644 --- a/cumulus/scripts/changelog/templates/global_priority.md.tera +++ b/cumulus/scripts/changelog/templates/global_priority.md.tera @@ -1,4 +1,4 @@ -{% import "priority.md.tera" as m_p -%} +{% import "high_priority.md.tera" as m_p -%} ## Global Priority {%- set cumulus_prio = 0 -%} @@ -26,7 +26,7 @@ {%- endif -%} {# We show the result #} -{{ m_p::priority(p=global_prio) }} +{{ m_p::high_priority(p=global_prio, changes=changes) }} {% endif %} +The changes motivating this priority level are: + +{% for pr in changes | sort(attribute="merged_at") -%} + {%- if pr.meta.C -%} + {%- if pr.meta.C.value == p %} +- {{ m_c::change(c=pr) }} +{%- if pr.meta.B and pr.meta.B.value == 7 %} +(RUNTIME) +{% endif %} + {%- endif -%} + {%- endif -%} +{%- endfor %} + + {%- endmacro priority -%} diff --git a/cumulus/scripts/changelog/templates/host_functions.md.tera b/cumulus/scripts/changelog/templates/host_functions.md.tera index 161d451ff1..6cc4c7581a 100644 --- a/cumulus/scripts/changelog/templates/host_functions.md.tera +++ b/cumulus/scripts/changelog/templates/host_functions.md.tera @@ -1,8 +1,6 @@ {%- import "change.md.tera" as m_c -%} {%- set_global host_fn_count = 0 -%} -## Host functions - {% for pr in changes | sort(attribute="merged_at") -%} {%- if pr.meta.B and pr.meta.B.value == 0 -%} @@ -18,8 +16,10 @@ {% if host_fn_count == 0 -%} -ℹ️ This release does not contain any new host functions. + {% elif host_fn_count == 1 -%} +## Host functions + ⚠️ The runtimes in this release contain one new **host function**. ⚠️ It is critical that you update your client before the chain switches to the new runtimes. diff --git a/cumulus/scripts/changelog/templates/pre_release.md.tera b/cumulus/scripts/changelog/templates/pre_release.md.tera index 2fd87defec..53a0e90654 100644 --- a/cumulus/scripts/changelog/templates/pre_release.md.tera +++ b/cumulus/scripts/changelog/templates/pre_release.md.tera @@ -1,9 +1,11 @@ {%- if env.PRE_RELEASE == "true" -%} ------ -⚠️ Howdy! Beware, this is a **pre-release** +
⚠️ This is a pre-release ------ - -{%- else -%} +**Release candidates** are **pre-releases** may not be final. +Although they are reasonably tested, there may be additional changes or issues +before an official release is tagged. Use at your own discretion, and consider +only using published releases on critical production infrastructure. +
+{% else -%} {%- endif %} diff --git a/cumulus/scripts/changelog/templates/runtime.md.tera b/cumulus/scripts/changelog/templates/runtime.md.tera index 755008cd64..f4afa78972 100644 --- a/cumulus/scripts/changelog/templates/runtime.md.tera +++ b/cumulus/scripts/changelog/templates/runtime.md.tera @@ -14,11 +14,12 @@ + ``` 🏋️ Runtime Size: {{ runtime.data.runtimes.compressed.subwasm.size | filesizeformat }} ({{ runtime.data.runtimes.compressed.subwasm.size }} bytes) 🔥 Core Version: {{ runtime.data.runtimes.compressed.subwasm.core_version }} 🗜 Compressed: {{ compressed }}: {{ comp_ratio | round(method="ceil", precision=2) }}% -🎁 Metadata version: {{ runtime.data.runtimes.compressed.subwasm.metadata_version }} +🎁 Metadata version: V{{ runtime.data.runtimes.compressed.subwasm.metadata_version }} 🗳️ system.setCode hash: {{ runtime.data.runtimes.compressed.subwasm.proposal_hash }} 🗳️ authorizeUpgrade hash: {{ runtime.data.runtimes.compressed.subwasm.parachain_authorize_upgrade_hash }} #️⃣ Blake2-256 hash: {{ runtime.data.runtimes.compressed.subwasm.blake2_256 }} diff --git a/cumulus/scripts/changelog/templates/template.md.tera b/cumulus/scripts/changelog/templates/template.md.tera index 105579e13c..5a1542e876 100644 --- a/cumulus/scripts/changelog/templates/template.md.tera +++ b/cumulus/scripts/changelog/templates/template.md.tera @@ -1,6 +1,12 @@ {# This is the entry point of the template -#} +{% include "pre_release.md.tera" -%} + +{% if env.PRE_RELEASE == "true" -%} +This pre-release contains the changes from `{{ env.REF1 }}` to `{{ env.REF2 }}`. +{% else -%} This release contains the changes from `{{ env.REF1 }}` to `{{ env.REF2 }}`. +{% endif -%} {%- set changes = cumulus.changes | concat(with=substrate.changes) -%} {%- set changes = changes | concat(with=polkadot.changes) -%} @@ -10,8 +16,6 @@ This release contains the changes from `{{ env.REF1 }}` to `{{ env.REF2 }}`. {%- set DOT = "[P]" -%} {%- set SUB = "[S]" -%} -{# header warning and important notices -#} -{% include "pre_release.md.tera" -%} {% include "global_priority.md.tera" -%}