Skip to content

Commit 90350cf

Browse files
Merge pull request #22 from CorruptedAesthetic/staging-preset-implementation
Update publish workflow for staging preset implementation
2 parents a65d55e + 4bb5060 commit 90350cf

1 file changed

Lines changed: 11 additions & 68 deletions

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -111,73 +111,16 @@ jobs:
111111
# Create chainspecs directory if it doesn't exist
112112
mkdir -p chainspecs
113113
114-
# First, get the default genesis config from the runtime
115-
chain-spec-builder create \
116-
-r runtime/fennel/target/srtool/release/wbuild/fennel-node-runtime/fennel_node_runtime.compact.wasm \
117-
default \
118-
> chainspecs/default-genesis.json
119-
120-
# Create development patch file that matches genesis_config_presets.rs
121-
cat > chainspecs/development-patch.json << EOF
122-
{
123-
"name": "Fennel Development",
124-
"id": "fennel-dev",
125-
"chainType": "Development",
126-
"properties": {
127-
"ss58Format": 42,
128-
"tokenDecimals": 12,
129-
"tokenSymbol": "FENNEL"
130-
},
131-
"genesis": {
132-
"runtime": {
133-
"system": {
134-
"code": "${WASM_HASH}"
135-
},
136-
"balances": {
137-
"balances": [
138-
["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", 1152921504606846976],
139-
["5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", 1152921504606846976],
140-
["5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y", 1152921504606846976],
141-
["5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy", 1152921504606846976]
142-
]
143-
},
144-
"sudo": {
145-
"key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
146-
},
147-
"validatorManager": {
148-
"initialValidators": [
149-
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
150-
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty"
151-
]
152-
},
153-
"session": {
154-
"keys": [
155-
[
156-
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
157-
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
158-
{
159-
"aura": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
160-
"grandpa": "5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu"
161-
}
162-
],
163-
[
164-
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
165-
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
166-
{
167-
"aura": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
168-
"grandpa": "5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E"
169-
}
170-
]
171-
]
172-
}
173-
}
174-
}
175-
}
176-
EOF
177-
178-
# Merge default genesis with our patch
179-
echo "Merging default genesis with development patch..."
180-
jq -s '.[0] * .[1]' chainspecs/default-genesis.json chainspecs/development-patch.json > chainspecs/development.json
114+
# Check if the runtime has a development preset
115+
echo "Checking available presets..."
116+
chain-spec-builder list-presets \
117+
--runtime runtime/fennel/target/srtool/release/wbuild/fennel-node-runtime/fennel_node_runtime.compact.wasm || true
118+
119+
# Use the dev preset from the runtime
120+
echo "Creating development chain spec using 'dev' preset..."
121+
chain-spec-builder create named-preset dev \
122+
--runtime runtime/fennel/target/srtool/release/wbuild/fennel-node-runtime/fennel_node_runtime.compact.wasm \
123+
--output chainspecs/development.json
181124
182125
# Convert to raw format
183126
echo "Converting to raw format..."
@@ -189,7 +132,7 @@ jobs:
189132
190133
# Output the final chain spec structure
191134
echo "Final chain spec structure:"
192-
jq -r '.genesis.runtime | keys[]' chainspecs/development.json
135+
jq -r '.genesis.runtime | keys[]' chainspecs/development.json || true
193136
194137
- name: Create staging chain specs with bootnodes
195138
run: |

0 commit comments

Comments
 (0)