Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate client/runtime release #1352

Merged
merged 18 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 55 additions & 28 deletions .github/scripts/generate-release-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,25 +236,30 @@ async function main() {
from: {
type: "string",
describe: "previous tag to retrieve commits from",
required: true,
requiresArg: true,
},
to: {
type: "string",
describe: "current tag being drafted",
required: true,
requiresArg: true,
},
owner: {
type: "string",
describe: "Repository owner (Ex: AstarNetwork)",
required: true,
requiresArg: true,
},
repo: {
type: "string",
describe: "Repository name (Ex: Astar)",
required: true,
requiresArg: true,
},
type: {
type: "string",
describe: "Type of release - runtime or client",
choices: ["runtime", "client"],
requiresArg: true,
}
})
.demandOption(["from", "to"])
.help().argv;

const octokit = new Octokit({
Expand All @@ -264,10 +269,6 @@ async function main() {
const previousTag = argv.from;
const newTag = argv.to;

const runtimes = ["shibuya", "shiden", "astar"].map((runtimeName) =>
getRuntimeInfo(argv["srtool-report-folder"], runtimeName)
);

const moduleLinks = ["polkadot-sdk", "frontier"].map((repoName) => ({
name: repoName,
link: getCompareLink(repoName, previousTag, newTag),
Expand Down Expand Up @@ -297,7 +298,8 @@ async function main() {
}
};

const template = `
if (argv.type === "client") {
const template = `
## Description
(Placeholder for release descriptions, please freely write explanations for this release here.)

Expand All @@ -308,6 +310,43 @@ async function main() {
> 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) |

[<img src="https://github.com/AstarNetwork/Astar/blob/master/.github/images/docker.webp" height="200px">](https://hub.docker.com/r/staketechnologies/astar-collator/tags)
`
console.log(template);
} else if (argv.type === "runtime") {
const runtimes = ["shibuya", "shiden", "astar"].map((runtimeName) =>
getRuntimeInfo(argv["srtool-report-folder"], runtimeName)
);

const template = `
## Description
(Placeholder for release descriptions, please freely write explanations for this release here.)

${runtimes.length > 0 ? `## Runtimes
${runtimes
.map(
Expand All @@ -319,7 +358,6 @@ ${runtimes
🎁 Metadata version: ${runtime.srtool.runtimes.compressed.subwasm.metadata_version}
🗳️ sha256: ${runtime.srtool.runtimes.compressed.sha256}
🗳️ blake2-256: ${runtime.srtool.runtimes.compressed.blake2_256}
🗳️ proposal (authorizeUpgrade): ${runtime.srtool.runtimes.compressed.subwasm.parachain_authorize_upgrade_hash}
📦 IPFS: ${runtime.srtool.runtimes.compressed.subwasm.ipfs_hash}
\`\`\`
`).join(`\n`)}` : ""}
Expand All @@ -328,10 +366,6 @@ ${runtimes
WASM runtime built using \`${runtimes[0]?.srtool.info.rustc}\`

## Changes
### Client
${clientPRs.length > 0 ? `
${clientPRs.map((pr) => `* ${printPr(pr)}`).join("\n")}
` : "None"}
### Runtime
${runtimePRs.length > 0 ? `
${runtimePRs.map((pr) => `* ${printPr(pr)}`).join("\n")}
Expand All @@ -344,18 +378,11 @@ ${remainingPRs.map((pr) => `* ${printPr(pr)}`).join("\n")}
## 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) |

[<img src="https://github.com/AstarNetwork/Astar/blob/master/.github/images/docker.webp" height="200px">](https://hub.docker.com/r/staketechnologies/astar-collator/tags)
`

console.log(template);
`
console.log(template);
} else {
console.log("Invalid type - should not happen.");
}
}

main();
main();
1 change: 1 addition & 0 deletions .github/workflows/base_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Loading
Loading