-
Notifications
You must be signed in to change notification settings - Fork 124
69 lines (69 loc) · 2.33 KB
/
genesis_files_for_relay.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: create relay genesis files
on:
workflow_dispatch:
inputs:
chain:
description: The name of the chain to generate files for
required: true
version:
description: A **released** version of manta to generate the genesis files from in the form vX.Y.Z
required: true
env:
CHAIN: ${{github.event.inputs.chain}}
VERSION: ${{github.event.inputs.version}}
jobs:
export_genesis_files:
runs-on: ubuntu-latest
steps:
- name: get curl
run: |
sudo apt update
sudo apt install -y curl
- name: fetch and chmod manta release
run: |
curl -L -o manta https://github.com/Manta-Network/Manta/releases/download/$VERSION/manta
chmod +x manta
ls -ahl .
- name: Export genesis files
run: |
./manta build-spec --chain $CHAIN --raw > $CHAIN-genesis.json
./manta export-genesis-state --chain $CHAIN > $CHAIN-genesis.state
./manta export-genesis-wasm --chain $CHAIN > $CHAIN-genesis.wasm
sha256sum $CHAIN-genesis.json $CHAIN-genesis.state $CHAIN-genesis.wasm | tee $CHAIN-genesis.sha256
# upload artifacts
- name: upload genesis
uses: actions/upload-artifact@v4
with:
name: ${{env.CHAIN}}-genesis.json
path: ${{env.CHAIN}}-genesis.json
- name: upload state
uses: actions/upload-artifact@v4
with:
name: ${{env.CHAIN}}-genesis.state
path: ${{env.CHAIN}}-genesis.state
- name: upload wasm
uses: actions/upload-artifact@v4
with:
name: ${{env.CHAIN}}-genesis.wasm
path: ${{env.CHAIN}}-genesis.wasm
# download artifacts and compare sha checksums
- name: remove files
run: |
rm $CHAIN-genesis.json
rm $CHAIN-genesis.state
rm $CHAIN-genesis.wasm
- name: download json
uses: actions/download-artifact@v3
with:
name: ${{env.CHAIN}}-genesis.json
- name: download state
uses: actions/download-artifact@v3
with:
name: ${{env.CHAIN}}-genesis.state
- name: download wasm
uses: actions/download-artifact@v3
with:
name: ${{env.CHAIN}}-genesis.wasm
- name: compare sha checksums
run: |
sha256sum --check --strict $CHAIN-genesis.sha256