-
Notifications
You must be signed in to change notification settings - Fork 80
63 lines (51 loc) · 1.77 KB
/
Copy pathrelease.yml
File metadata and controls
63 lines (51 loc) · 1.77 KB
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
name: Release WASM Artifacts
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build-and-release:
name: Build & Release WASM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
contracts/target
key: ${{ runner.os }}-cargo-${{ hashFiles('contracts/Cargo.lock') }}
- name: Run tests
working-directory: contracts
run: cargo test --quiet
- name: Build optimized WASM
working-directory: contracts
run: cargo build --target wasm32v1-none --release --quiet
- name: Collect artifacts
run: |
mkdir -p dist
cp contracts/target/wasm32v1-none/release/*.wasm dist/
ls -lh dist/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*.wasm
generate_release_notes: true
body: |
## Parashield Protocol ${{ github.ref_name }}
### Contracts
- `parashield_oracle_verifier.wasm` — Oracle data aggregation
- `parashield_policy_engine.wasm` — Insurance product and policy management
- `parashield_claims_processor.wasm` — Automated claim evaluation
- `parashield_risk_pool.wasm` — LP liquidity pools with yield distribution
- `parashield_governance_dao.wasm` — Token-weighted protocol governance
### Verification
Verify WASM hash against the published checksum before deploying.