Skip to content

Commit

Permalink
Migrate changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Sep 6, 2024
1 parent 6fcc625 commit 9854292
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 82 deletions.
142 changes: 71 additions & 71 deletions .github/scripts/generate-release-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
[<img src="https://github.com/AstarNetwork/Astar/blob/master/.github/images/docker.webp" height="200px">](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) |
[<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") {
Expand All @@ -344,45 +344,45 @@ 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 {
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
12 changes: 6 additions & 6 deletions .github/workflows/release-client.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Build
name: Release Client Build
on:
push:
tags:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down Expand Up @@ -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
10 changes: 5 additions & 5 deletions .github/workflows/release-runtime.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/tests.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

0 comments on commit 9854292

Please sign in to comment.