Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Prep 0.9.16 (#4773)
Browse files Browse the repository at this point in the history
* New changelog scripts (#4491)

* Add templates

* Add folder for local storage of the digests

* Add first draft of the changelog scripts

* Enable Audits in the change template

* Fixes for Polkadot

* Fix templating issue in case there is no high prio change

* Fix Ruby setup

* Remove shell

* Fix chain names

* Fix ENV

* Fix how to get runtime

* Fix runtime_dir

* Fix context location

* Pin changelogerator to a specific version

* New weights for Westend

* New weights for Kusama

* New weights for Polkadot

* deps update
  • Loading branch information
chevdor authored Jan 24, 2022
1 parent 8664023 commit 97879a8
Show file tree
Hide file tree
Showing 104 changed files with 3,706 additions and 1,967 deletions.
75 changes: 63 additions & 12 deletions .github/workflows/publish-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Cache target dir
uses: actions/cache@v2
with:
Expand All @@ -36,21 +37,25 @@ jobs:
restore-keys: |
srtool-target-${{ matrix.runtime }}-
srtool-target-
- name: Build ${{ matrix.runtime }} runtime
id: srtool_build
uses: chevdor/srtool-actions@v0.3.0
with:
# This is the default with chevdor/srtool-actions@v0.3.0 but we make it clear
image: paritytech/srtool
chain: ${{ matrix.runtime }}

- name: Store srtool digest to disk
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime }}_srtool_output.json
- name: Upload ${{ matrix.runtime }} srtool json
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.runtime }}-srtool-json
path: ${{ matrix.runtime }}_srtool_output.json

- name: Upload ${{ matrix.runtime }} runtime
uses: actions/upload-artifact@v2
with:
Expand All @@ -70,20 +75,59 @@ jobs:
with:
fetch-depth: 0
path: polkadot
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.0.0

- name: Download srtool json output
uses: actions/download-artifact@v2
- name: Generate release text

- name: Prepare tooling
run: |
cd polkadot/scripts/changelog
gem install bundler changelogerator:0.9.1
bundle install
changelogerator --help
URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.1/tera-cli_linux_amd64.deb
wget $URL -O tera.deb
sudo dpkg -i tera.deb
tera --version
- name: Generate release notes
env:
RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }}
RUSTC_NIGHTLY: ${{ needs.get-rust-versions.outputs.rustc-nightly }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NO_CACHE: 1
DEBUG: 1
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
PRE_RELEASE: ${{ github.event.inputs.pre_release }}
HIDE_SRTOOL_ROCOCO: false
run: |
gem install changelogerator:0.0.16 git toml
ruby $GITHUB_WORKSPACE/polkadot/scripts/github/generate_release_text.rb | tee release_text.md
find ${{env.GITHUB_WORKSPACE}} -type f -name "*_srtool_output.json"
ls -al $WESTEND_DIGEST
ls -al $KUSAMA_DIGEST
ls -al $POLKADOT_DIGEST
cd polkadot/scripts/changelog
./bin/changelog
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: |
polkadot/scripts/changelog/context.json
**/*_srtool_output.json
- name: Create draft release
id: create-release
uses: actions/create-release@v1
Expand All @@ -92,12 +136,14 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Polkadot ${{ github.ref }}
body_path: ./release_text.md
body_path: ./polkadot/scripts/changelog/release-notes.md
draft: true

publish-runtimes:
runs-on: ubuntu-latest
needs: ["publish-draft-release"]
env:
RUNTIME_DIR: runtime
strategy:
matrix:
runtime: ["polkadot", "kusama", "westend"]
Expand All @@ -107,16 +153,21 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.0.0
- name: Get runtime version
id: get-runtime-ver
run: |
ls
ls "${{ matrix.runtime }}-runtime"
runtime_ver="$(ruby -e 'require "./scripts/github/lib.rb"; puts get_runtime("${{ matrix.runtime }}")')"
echo "require './scripts/github/lib.rb'" > script.rb
echo "puts get_runtime(runtime: \"${{ matrix.runtime }}\", runtime_dir: \"$RUNTIME_DIR\")" >> script.rb
echo "Current folder: $PWD"
ls "$RUNTIME_DIR/${{ matrix.runtime }}"
runtime_ver=$(ruby script.rb)
echo "Found version: >$runtime_ver<"
echo "::set-output name=runtime_ver::$runtime_ver"
- name: Upload compressed ${{ matrix.runtime }} wasm
uses: actions/upload-release-asset@v1
env:
Expand Down
Loading

0 comments on commit 97879a8

Please sign in to comment.