From 98542924a1b1664800fb9a89b619c627deb83828 Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Fri, 6 Sep 2024 16:19:52 +0200 Subject: [PATCH] Migrate changes --- .github/scripts/generate-release-body.ts | 142 +++++++++++------------ .github/workflows/base_checks.yaml | 1 + .github/workflows/release-client.yml | 12 +- .github/workflows/release-runtime.yml | 10 +- .github/workflows/tests.yaml | 1 + 5 files changed, 84 insertions(+), 82 deletions(-) diff --git a/.github/scripts/generate-release-body.ts b/.github/scripts/generate-release-body.ts index 2006adaff2..c3c86d5a4f 100644 --- a/.github/scripts/generate-release-body.ts +++ b/.github/scripts/generate-release-body.ts @@ -300,42 +300,42 @@ async function main() { if (argv.type === "client") { const template = ` - ## Description - (Placeholder for release descriptions, please freely write explanations for this release here.) - - \*\*Upgrade priority: LOW/MID/HIGH/CRITICAL\*\* - > DELETE THIS - > CRITICAL - contains critical update for the client which should be rolled out ASAP - > HIGH - significant changes to client - > MEDIUM - some minor changes to the client - > LOW - no client changes - - ## Changes - ### Client - ${clientPRs.length > 0 ? ` - ${clientPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} - ` : "None"} - ### Runtime (impacts built-in runtimes) - ${runtimePRs.length > 0 ? ` - ${runtimePRs.map((pr) => `* ${printPr(pr)}`).join("\n")} - ` : "None"} - ### Others - ${remainingPRs.length > 0 ? ` - ${remainingPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} - ` : "None"} - - ## Dependency Changes - Astar: https://github.com/${argv.owner}/${argv.repo}/compare/${previousTag}...${newTag} - ${moduleLinks.map((modules) => `${capitalize(modules.name)}: ${modules.link}`).join("\n")} - - ## Download Links - | Arch | Link | - | ----------- | ------- | - | \`MacOS x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-macOS-x86_64.tar.gz) | - | \`Ubuntu x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-x86_64.tar.gz) | - | \`Ubuntu aarch64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-aarch64.tar.gz) | - - [](https://hub.docker.com/r/staketechnologies/astar-collator/tags) +## Description +(Placeholder for release descriptions, please freely write explanations for this release here.) + +\*\*Upgrade priority: LOW/MID/HIGH/CRITICAL\*\* +> DELETE THIS +> CRITICAL - contains critical update for the client which should be rolled out ASAP +> HIGH - significant changes to client +> MEDIUM - some minor changes to the client +> LOW - no client changes + +## Changes +### Client +${clientPRs.length > 0 ? ` +${clientPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} +### Runtime (impacts built-in runtimes) +${runtimePRs.length > 0 ? ` +${runtimePRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} +### Others +${remainingPRs.length > 0 ? ` +${remainingPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} + +## Dependency Changes +Astar: https://github.com/${argv.owner}/${argv.repo}/compare/${previousTag}...${newTag} +${moduleLinks.map((modules) => `${capitalize(modules.name)}: ${modules.link}`).join("\n")} + +## Download Links +| Arch | Link | +| ----------- | ------- | +| \`MacOS x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-macOS-x86_64.tar.gz) | +| \`Ubuntu x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-x86_64.tar.gz) | +| \`Ubuntu aarch64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-aarch64.tar.gz) | + +[](https://hub.docker.com/r/staketechnologies/astar-collator/tags) ` console.log(template); } else if (argv.type === "runtime") { @@ -344,40 +344,40 @@ async function main() { ); const template = ` - ## Description - (Placeholder for release descriptions, please freely write explanations for this release here.) - - ${runtimes.length > 0 ? `## Runtimes - ${runtimes - .map( - (runtime) => `### ${capitalize(runtime.name)} - \`\`\` - ✨ spec_version: ${runtime.version} - 🏋 Runtime Size: ${runtime.srtool.runtimes.compressed.size} - 🗜 Compressed: ${runtime.srtool.runtimes.compressed.subwasm.compression.compressed ? "Yes" : "No"} - 🎁 Metadata version: ${runtime.srtool.runtimes.compressed.subwasm.metadata_version} - 🗳️ sha256: ${runtime.srtool.runtimes.compressed.sha256} - 🗳️ blake2-256: ${runtime.srtool.runtimes.compressed.blake2_256} - 📦 IPFS: ${runtime.srtool.runtimes.compressed.subwasm.ipfs_hash} - \`\`\` - `).join(`\n`)}` : ""} - - ## Build Info - WASM runtime built using \`${runtimes[0]?.srtool.info.rustc}\` - - ## Changes - ### Runtime - ${runtimePRs.length > 0 ? ` - ${runtimePRs.map((pr) => `* ${printPr(pr)}`).join("\n")} - ` : "None"} - ### Others - ${remainingPRs.length > 0 ? ` - ${remainingPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} - ` : "None"} - - ## Dependency Changes - Astar: https://github.com/${argv.owner}/${argv.repo}/compare/${previousTag}...${newTag} - ${moduleLinks.map((modules) => `${capitalize(modules.name)}: ${modules.link}`).join("\n")} +## Description +(Placeholder for release descriptions, please freely write explanations for this release here.) + +${runtimes.length > 0 ? `## Runtimes +${runtimes + .map( + (runtime) => `### ${capitalize(runtime.name)} +\`\`\` +✨ spec_version: ${runtime.version} +🏋 Runtime Size: ${runtime.srtool.runtimes.compressed.size} +🗜 Compressed: ${runtime.srtool.runtimes.compressed.subwasm.compression.compressed ? "Yes" : "No"} +🎁 Metadata version: ${runtime.srtool.runtimes.compressed.subwasm.metadata_version} +🗳️ sha256: ${runtime.srtool.runtimes.compressed.sha256} +🗳️ blake2-256: ${runtime.srtool.runtimes.compressed.blake2_256} +📦 IPFS: ${runtime.srtool.runtimes.compressed.subwasm.ipfs_hash} +\`\`\` +`).join(`\n`)}` : ""} + +## Build Info +WASM runtime built using \`${runtimes[0]?.srtool.info.rustc}\` + +## Changes +### Runtime +${runtimePRs.length > 0 ? ` +${runtimePRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} +### Others +${remainingPRs.length > 0 ? ` +${remainingPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} + +## Dependency Changes +Astar: https://github.com/${argv.owner}/${argv.repo}/compare/${previousTag}...${newTag} +${moduleLinks.map((modules) => `${capitalize(modules.name)}: ${modules.link}`).join("\n")} ` console.log(template); } else { @@ -385,4 +385,4 @@ async function main() { } } -main(); +main(); \ No newline at end of file diff --git a/.github/workflows/base_checks.yaml b/.github/workflows/base_checks.yaml index 38e2c5357d..78d10d86e2 100644 --- a/.github/workflows/base_checks.yaml +++ b/.github/workflows/base_checks.yaml @@ -5,6 +5,7 @@ on: - '**' tags-ignore: - v[0-9]+.[0-9]+.[0-9]+* + - runtime-[0-9]+* workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/release-client.yml b/.github/workflows/release-client.yml index 6665555f1a..6c808612c4 100644 --- a/.github/workflows/release-client.yml +++ b/.github/workflows/release-client.yml @@ -1,4 +1,4 @@ -name: Release Build +name: Release Client Build on: push: tags: @@ -94,7 +94,7 @@ jobs: env: TARGET: ${{ matrix.target }} id: artifact-name - run: echo "::set-output name=name::astar-ubuntu-latest-${TARGET%%-*}" + run: echo "name=astar-ubuntu-latest-${TARGET%%-*}" >> $GITHUB_OUTPUT - uses: actions/upload-artifact@v3 with: @@ -189,7 +189,7 @@ jobs: push: true publish-release-draft: - needs: [native-linux, native-macOS, docker] + needs: [native-linux, native-macos, docker] runs-on: ubuntu-latest outputs: release_url: ${{ steps.create-release.outputs.html_url }} @@ -207,10 +207,10 @@ jobs: - name: Get the latest client release id: latest-release # We're making an assumption that the latest client release will be within the last 30 releases - run: | + run: | latest_client_tag=$(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases | \ jq -r 'map(select(.name | test("^v\\d+\\.\\d+\\.\\d+$"; "i")))[0] | .tag_name') - echo "::set-output name=latest_client_tag::$latest_client_tag" + echo "latest_client_tag=$latest_client_tag" >> $GITHUB_OUTPUT - name: Generate Release Body env: @@ -325,4 +325,4 @@ jobs: working-directory: third-party/zombienet env: CHAIN: ${{ matrix.chain }} - run: zombienet -p native test smoke.zndsl + run: zombienet -p native test smoke.zndsl \ No newline at end of file diff --git a/.github/workflows/release-runtime.yml b/.github/workflows/release-runtime.yml index a64b050f61..3d5553b109 100644 --- a/.github/workflows/release-runtime.yml +++ b/.github/workflows/release-runtime.yml @@ -1,8 +1,8 @@ -name: Release Build +name: Release Runtime Build on: push: tags: - - runtime-[0-9]{4,}* + - runtime-[0-9]+* workflow_dispatch: env: SUBWASM_VERSION: 0.16.1 @@ -201,10 +201,10 @@ jobs: - name: Get the latest runtime release id: latest-release # We're making an assumption that the latest runtime release will be within the last 30 releases - run: | + run: | latest_runtime_tag=$(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases | \ jq -r 'map(select(.name | test("(^runtime-\\d{4,}$)|(^v\\d+\\.\\d+\\.\\d+$)"; "i")))[0] | .tag_name') - echo "::set-output name=latest_runtime_tag::$latest_runtime_tag" + echo "latest_runtime_tag=$latest_runtime_tag" >> $GITHUB_OUTPUT - name: Generate Release Body env: @@ -341,4 +341,4 @@ jobs: upload_url: ${{ needs.publish-release-draft.outputs.upload_url }} asset_path: evm-tracing-artifacts.tar.gz asset_name: evm-tracing-artifacts-${{ github.ref_name }}.tar.gz - asset_content_type: application/gzip + asset_content_type: application/gzip \ No newline at end of file diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 708c6d1ea9..8427343308 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,6 +5,7 @@ on: - '**' tags-ignore: - v[0-9]+.[0-9]+.[0-9]+* + - runtime-[0-9]+* workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }}