From 47aab7403469e93405cd942af4db6c1dd45692c5 Mon Sep 17 00:00:00 2001 From: Mavdol Date: Tue, 24 Feb 2026 11:56:50 +0100 Subject: [PATCH] ci: add step to prepare capsule-core WIT files by copying and adjusting relative paths in the release workflow. --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c517c7b..c2891cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -246,6 +246,29 @@ jobs: - name: Install Maturin run: pip install maturin + - name: Prepare capsule-core WIT files + shell: bash + run: | + cp -r crates/capsule-wit crates/capsule-core/ + python -c " + import re + + replacements = [ + ('crates/capsule-core/src/wasm/compiler/mod.rs', + '../../../../capsule-wit', '../../../capsule-wit'), + ('crates/capsule-core/src/wasm/state.rs', + '\"../capsule-wit\"', '\"./capsule-wit\"'), + ('crates/capsule-core/src/wasm/utilities/wit_manager.rs', + '../../../../capsule-wit', '../../../capsule-wit'), + ] + + for path, old, new in replacements: + with open(path, 'r') as f: + content = f.read() + with open(path, 'w') as f: + f.write(content.replace(old, new)) + " + - name: Copy SDK source for maturin shell: bash run: |