Skip to content

Commit

Permalink
[skip-ci] change spec version extraction query
Browse files Browse the repository at this point in the history
  • Loading branch information
breathx committed Dec 10, 2024
1 parent e29a699 commit c97fe7e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ jobs:
- name: "Environment: Export versions"
run: |
echo "VARA_SPEC=$(cat runtime/vara/src/lib.rs | grep "spec_version: " | awk -F " " '{print substr($2, 1, length($2)-1)}')" >> $GITHUB_ENV
echo "VARA_PROD_SPEC=$(cat runtime/vara/src/lib.rs | grep "spec_version: " | head -n 1 | awk -F " " '{print substr($2, 1, length($2)-1)}')" >> $GITHUB_ENV
echo "VARA_DEV_SPEC=$(cat runtime/vara/src/lib.rs | grep "spec_version: " | tail -n 1 | awk -F " " '{print substr($2, 1, length($2)-1)}')" >> $GITHUB_ENV
- name: "Environment: Make `artifact` directory"
run: mkdir -p artifact
Expand All @@ -80,10 +81,10 @@ jobs:

- name: "Artifact: Production `vara-runtime` metadata"
run: |
RUNTIME_WASM=target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm PRINT_SCALE=1 cargo run -p gsdk-api-gen --release > "artifact/production_vara_runtime_v${VARA_SPEC}_metadata.scale"
RUNTIME_WASM=target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm PRINT_SCALE=1 cargo run -p gsdk-api-gen --release > "artifact/production_vara_runtime_v${VARA_PROD_SPEC}_metadata.scale"
- name: "Artifact: Production `vara-runtime`"
run: cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/production_vara_runtime_v$VARA_SPEC.wasm"
run: cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/production_vara_runtime_v${VARA_PROD_SPEC}.wasm"

- name: "Build: Production node client and development `vara-runtime`"
run: cargo build -p gear-cli --profile production
Expand All @@ -93,18 +94,18 @@ jobs:

- name: "Artifact: Development `vara-runtime` metadata"
run: |
RUNTIME_WASM=target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm PRINT_SCALE=1 cargo run -p gsdk-api-gen --release > "artifact/testnet_vara_runtime_v${VARA_SPEC}_metadata.scale"
RUNTIME_WASM=target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm PRINT_SCALE=1 cargo run -p gsdk-api-gen --release > "artifact/testnet_vara_runtime_v${VARA_DEV_SPEC}_metadata.scale"
- name: "Artifact: Production node client and development `vara-runtime`"
run: |
cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/testnet_vara_runtime_v$VARA_SPEC.wasm"
cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/testnet_vara_runtime_v${VARA_DEV_SPEC}.wasm"
cp target/production/gear artifact/gear
strip artifact/gear || true
- name: Check SHA256 checksums
run: |
sha256sum artifact/production_vara_runtime_v$VARA_SPEC.wasm
sha256sum artifact/testnet_vara_runtime_v$VARA_SPEC.wasm
sha256sum artifact/production_vara_runtime_v${VARA_PROD_SPEC}.wasm
sha256sum artifact/testnet_vara_runtime_v${VARA_DEV_SPEC}.wasm
- name: Publish
uses: softprops/action-gh-release@v2
Expand Down

0 comments on commit c97fe7e

Please sign in to comment.