From e69d4255f8fd3753df56a5f2ac0821018556636f Mon Sep 17 00:00:00 2001
From: Mara Robin B <mara@broda.me>
Date: Wed, 2 Mar 2022 10:12:13 +0100
Subject: [PATCH] ci: Add rococo to release pipeline (#5015)

* include rococo in wording of release checklist

* ci: add rococo to release drafts & changelog
---
 polkadot/.github/ISSUE_TEMPLATE/release.md           | 4 ++--
 polkadot/.github/workflows/publish-draft-release.yml | 6 ++++--
 polkadot/scripts/changelog/bin/changelog             | 4 ++++
 polkadot/scripts/github/generate_release_text.rb     | 1 +
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/polkadot/.github/ISSUE_TEMPLATE/release.md b/polkadot/.github/ISSUE_TEMPLATE/release.md
index cbeb7b21d64..b9b3a6c337a 100644
--- a/polkadot/.github/ISSUE_TEMPLATE/release.md
+++ b/polkadot/.github/ISSUE_TEMPLATE/release.md
@@ -7,7 +7,7 @@ title: Polkadot {{ env.VERSION }} Release checklist
 
 This is the release checklist for Polkadot {{ env.VERSION }}. **All** following
 checks should be completed before publishing a new release of the
-Polkadot/Kusama/Westend runtime or client. The current release candidate can be
+Polkadot/Kusama/Westend/Rococo runtime or client. The current release candidate can be
 checked out with `git checkout release-{{ env.VERSION }}`
 
 ### Runtime Releases
@@ -17,7 +17,7 @@ candidate branch.
 
 - [ ] Verify [`spec_version`](https://github.com/paritytech/polkadot/blob/master/doc/release-checklist.md#spec-version) has been incremented since the
     last release for any native runtimes from any existing use on public
-    (non-private/test) networks. If the runtime was published (release or pre-release), either
+    (non-private) networks. If the runtime was published (release or pre-release), either
     the `spec_version` or `impl` must be bumped.
 - [ ] Verify previously [completed migrations](https://github.com/paritytech/polkadot/blob/master/doc/release-checklist.md#old-migrations-removed) are
     removed for any public (non-private/test) networks.
diff --git a/polkadot/.github/workflows/publish-draft-release.yml b/polkadot/.github/workflows/publish-draft-release.yml
index 80da8329267..a4a6f533bf4 100644
--- a/polkadot/.github/workflows/publish-draft-release.yml
+++ b/polkadot/.github/workflows/publish-draft-release.yml
@@ -24,7 +24,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        runtime: ["polkadot", "kusama", "westend"]
+        runtime: ["polkadot", "kusama", "westend", "rococo"]
     steps:
       - name: Checkout sources
         uses: actions/checkout@v2
@@ -103,6 +103,7 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           NO_CACHE: 1
           DEBUG: 1
+          ROCOCO_DIGEST: ${{ github.workspace}}/rococo-srtool-json/rococo_srtool_output.json
           WESTEND_DIGEST: ${{ github.workspace}}/westend-srtool-json/westend_srtool_output.json
           KUSAMA_DIGEST: ${{ github.workspace}}/kusama-srtool-json/kusama_srtool_output.json
           POLKADOT_DIGEST: ${{ github.workspace}}/polkadot-srtool-json/polkadot_srtool_output.json
@@ -110,6 +111,7 @@ jobs:
           HIDE_SRTOOL_ROCOCO: false
         run: |
           find ${{env.GITHUB_WORKSPACE}} -type f -name "*_srtool_output.json"
+          ls -al $ROCOCO_DIGEST
           ls -al $WESTEND_DIGEST
           ls -al $KUSAMA_DIGEST
           ls -al $POLKADOT_DIGEST
@@ -146,7 +148,7 @@ jobs:
       RUNTIME_DIR: runtime
     strategy:
       matrix:
-        runtime: ["polkadot", "kusama", "westend"]
+        runtime: ["polkadot", "kusama", "westend", "rococo"]
     steps:
       - name: Checkout sources
         uses: actions/checkout@v2
diff --git a/polkadot/scripts/changelog/bin/changelog b/polkadot/scripts/changelog/bin/changelog
index 9476fc50e6c..f25f57daf46 100755
--- a/polkadot/scripts/changelog/bin/changelog
+++ b/polkadot/scripts/changelog/bin/changelog
@@ -65,6 +65,7 @@ end
 
 KUSAMA_DIGEST = ENV['KUSAMA_DIGEST'] || 'digests/kusama_srtool_output.json'
 WESTEND_DIGEST = ENV['WESTEND_DIGEST'] || 'digests/westend_srtool_output.json'
+ROCOCO_DIGEST = ENV['ROCOCO_DIGEST'] || 'digests/rococo_srtool_output.json'
 POLKADOT_DIGEST = ENV['POLKADOT_DIGEST'] || 'digests/polkadot_srtool_output.json'
 
 # Here we compose all the pieces together into one
@@ -74,6 +75,7 @@ cmd = format('jq \
     --slurpfile polkadot %s \
     --slurpfile srtool_kusama %s \
     --slurpfile srtool_westend %s \
+    --slurpfile srtool_rococo %s \
     --slurpfile srtool_polkadot %s \
     -n \'{
             substrate: $substrate[0],
@@ -81,10 +83,12 @@ cmd = format('jq \
         srtool: [
         { name: "kusama", data: $srtool_kusama[0] },
         { name: "westend", data: $srtool_westend[0] },
+        { name: "rococo", data: $srtool_rococo[0] },
         { name: "polkadot", data: $srtool_polkadot[0] }
     ] }\' > context.json', substrate_data, polkadot_data,
              KUSAMA_DIGEST,
              WESTEND_DIGEST,
+             ROCOCO_DIGEST,
              POLKADOT_DIGEST)
 system(cmd)
 
diff --git a/polkadot/scripts/github/generate_release_text.rb b/polkadot/scripts/github/generate_release_text.rb
index c1fe06f45eb..7c03dc73cd2 100644
--- a/polkadot/scripts/github/generate_release_text.rb
+++ b/polkadot/scripts/github/generate_release_text.rb
@@ -128,6 +128,7 @@ rustc_nightly = ENV['RUSTC_NIGHTLY']
 polkadot_runtime = get_runtime('polkadot', polkadot_path)
 kusama_runtime = get_runtime('kusama', polkadot_path)
 westend_runtime = get_runtime('westend', polkadot_path)
+rococo_runtime = get_runtime('rococo', polkadot_path)
 
 # These json files should have been downloaded as part of the build-runtimes
 # github action
-- 
GitLab