I have a simple parent folder and multiple contracts inside it in a simple structure as follows:
contracts
|__contract1
|__contract2
I add a root Cargo.toml file under contracts
and with the following content:
[workspace]
members = [contract1, contract2]
If I call cargo contract build
inside contract1 and contract2 it will work with no issues. If I call cargo build
inside the root folder contracts
, this will also work. However this is not what we want becuase it's not creating the ink contract bundles. If I call cargo contract build
inside the root folder, it would complain:
ERROR: Cannot infer the root project id
These contracts are independent and building them together is just for the sake of having a simple github workflow without the need to know which contracts we will maintain under the contracts
folder at the github workflow level. Is this issue known? How can I fix it?