From 1040bbec8bd965a504b7dd61a525384020afc968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BBuk?= Date: Thu, 1 Aug 2024 15:10:39 +0200 Subject: [PATCH] Release workflow docs --- .github/workflows/release.yml | 2 +- RELEASE.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 RELEASE.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f44d29f29..1655293345 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,7 +153,7 @@ jobs: with: generate_release_notes: true tag_name: ${{ steps.version.outputs.version }} - target_commitish: + target_commitish: "${{ github.sha }}" files: | linux_x86_build mainnet-${{ steps.version.outputs.version }}.wasm diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..0b71cf3f0a --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,21 @@ +# Releasing new version + +## Sanity checks: + +1. Check `spec_version` value in [runtime's lib.rs](./substrate/bin/node/runtime/src/lib.rs). There are 2: one for mainnet and one for testnet. They should be the same and higher than the last release. +2. Check `version` in [runtime's Cargo.toml](./substrate/bin/node/runtime/Cargo.toml). Major version should match the `spec_version`. +3. Check `version` in [cli's Cargo.toml](./substrate/bin/node/cli/Cargo.toml). Major version should match the `spec_version`. This is the version that will be used as the name of the release and tag. + +## Release + +1. Go to the [Release new version](https://github.com/liberland/liberland_substrate/actions/workflows/release.yml) action in GitHub, select `Run workflow`, choose the branch (usually `develop` or `main`) and run it. This action will do the following: + * Run unit-tests + * Run `try-runtime` migration checks (which detects things like state inconsitencies or pallet/state version mismatches) + * Run fork test for both bastiat and mainnet and check if whole state is still parsable post-fork + * Build runtimes in a reproducible way + * Build new binary + * Create a new GitHub Release + * Build & publish new Docker Image +2. Wait for the `Release new version` action to finish. +3. Go to [GitHub Releases](https://github.com/liberland/liberland_substrate/releases). New release should be there, ready for deployment. +4. (Optional) Open a new PR that bumps versions for the next release. [Sample PR](https://github.com/liberland/liberland_substrate/pull/404/files). \ No newline at end of file