dao-contracts icon indicating copy to clipboard operation
dao-contracts copied to clipboard

feat: initial workflow to delpoy, justfile

Open bmorphism opened this issue 3 years ago • 0 comments

Context

https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions https://docs.junonetwork.io/cli/useful-cli-commands https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions https://github.com/Samangan/dao-contracts/pull/1 https://hub.docker.com/r/cosmwasm/workspace-optimizer https://github.com/CosmWasm/rust-optimizer https://github.com/actions/checkout Bonus alfalfa: https://github.com/casey/just

First pass - contract deploy CI

  • upon merge to main (which is protected) - compile the contracts to get .wasm artifacts
  • using a special deploy wallet seed phrase, set up junod with a wallet
    • store the actual key as a secret file and mount into build container runtime's location where it is expected
  • use junod to upload the new version of contracts Junø
  • ???
  • PROFIT!!111

junod

image: ghcr.io/cosmoscontracts/juno:v6.0.0 junod keys add aid --recover

Compile

docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  --platform linux/amd64 \
  cosmwasm/workspace-optimizer:0.12.6

bmorphism avatar Jun 06 '22 21:06 bmorphism