Skip to content

Commit

Permalink
Merge branch 'main' into bear-refactor-ethtx-forward
Browse files Browse the repository at this point in the history
  • Loading branch information
hackfisher committed Mar 15, 2024
2 parents a72872b + 0db4b99 commit a5116fa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/note-template/runtime.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## {{ .Env.CHAIN | strings.Title }}
<h4 align="right">Upgrade Priority LOW :green_circle:</h4>

#### Proposal Hash
#### Whitelist Hash
```
{{ (ds "srtool").runtimes.compressed.subwasm.proposal_hash }}
{{ .Env.WHITELIST_HASH }}
```
#### Blake2 256 Hash
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Runtime override
name: Notify release

on:
push:
Expand All @@ -15,11 +15,11 @@ jobs:
- name: Notify
run: |
TAG=$(echo ${{ github.ref }} | sed 's!.*/\(.*\)!\1!')
curl -XPOST \
curl -X POST \
-H "Authorization:Bearer ${{ secrets.GH_TKN_DARWINIA }}" \
-H "Accept:application/vnd.github+json" \
"https://api.github.com/repos/darwinia-network/wasm-runtime-overrides/dispatches" \
-d '{"event_type":"create","client_payload":{"network":"mainnet","tag":"'"${TAG}"'"}}'
"https://api.github.com/repos/darwinia-network/darwinia-releases/actions/workflows/wasm.yml/dispatches" \
-d '{"ref":"main","inputs":{"network":"mainnet","tag":"'${TAG}'"}}'
notify-testnet:
name: Notify testnet
Expand All @@ -29,8 +29,8 @@ jobs:
- name: Notify
run: |
TAG=$(echo ${{ github.ref }} | sed 's!.*/\(.*\)!\1!')
curl -XPOST \
curl -X POST \
-H "Authorization:Bearer ${{ secrets.GH_TKN_DARWINIA }}" \
-H "Accept:application/vnd.github+json" \
"https://api.github.com/repos/darwinia-network/wasm-runtime-overrides/dispatches" \
-d '{"event_type":"create","client_payload":{"network":"testnet","tag":"'"${TAG}"'"}}'
"https://api.github.com/repos/darwinia-network/darwinia-releases/actions/workflows/wasm.yml/dispatches" \
-d '{"ref":"main","inputs":{"network":"testnet","tag":"'${TAG}'"}}'
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ jobs:
curl -LO ${{ env.GOMPLATE_URL }}/${{ env.GOMPLATE_VERSION }}/${{ env.GOMPLATE }}
chmod u+x ${{ env.GOMPLATE }}
sudo mv ${{ env.GOMPLATE }} /usr/bin/gomplate
- name: Setup wuh
run: |
curl -LO https://github.com/darwinia-network/darwinia-releases/releases/download/v0.1.0/wuh.zst
zstd -d wuh.zst
chmod u+x ./wuh
sudo mv ./wuh /usr/bin/wuh
- name: Filter
run: |
SKIP_BUILD=${{ env.SKIP_BUILD }}
Expand Down Expand Up @@ -146,7 +152,15 @@ jobs:
if [ "$FILTER" == "true" ]; then
echo '${{ steps.srtool_build.outputs.json }}' | jq > build/${CHAIN}-srtool.json
mv ${{ steps.srtool_build.outputs.wasm_compressed }} build/
WASM_FILE='${{ steps.srtool_build.outputs.wasm_compressed }}'
WHITELIST_PALLET_INDEX=0x33
if [ "$CHAIN" == "crab" ]; then
WHITELIST_PALLET_INDEX=0x2f
fi
export WHITELIST_HASH=$(wuh ${WASM_FILE} ${WHITELIST_PALLET_INDEX} 0x01)
mv ${WASM_FILE} build/
cat .github/note-template/runtime.md \
| gomplate -d srtool=build/${CHAIN}-srtool.json \
Expand Down Expand Up @@ -263,7 +277,7 @@ jobs:
# ls -la deploy/
# cat build/*.md
- name: Publish
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body_path: "node.md"
files: |
Expand Down

0 comments on commit a5116fa

Please sign in to comment.