diff --git a/.github/actions/install-conta/action.yml b/.github/actions/install-conta/action.yml new file mode 100644 index 000000000..28e013189 --- /dev/null +++ b/.github/actions/install-conta/action.yml @@ -0,0 +1,16 @@ +name: "Install conta" +description: "Install conta for publishing packages" + +runs: + using: composite + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + + - uses: actions/cache@v3 + with: + path: ~/.cargo/bin/conta + key: ${{ runner.os }}-conta + + - name: Install Conta + run: cargo install conta diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 184be1496..968b3dffc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,11 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install-conta - - name: Setup rust toolchain - uses: dtolnay/rust-toolchain@nightly - - - name: Release packages to crates.io - run: cargo run --release --package conta publish + - name: Release packages on crates.io + run: conta publish env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index fa93fc781..6cc2cfa2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -631,7 +631,6 @@ dependencies = [ "anyhow", "cargo_metadata", "ccli", - "clap", "colored", "etc", "semver", diff --git a/Cargo.toml b/Cargo.toml index b42d87ede..90ad30641 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,6 @@ repository = "https://github.com/clearloop/zink.git" anyhow = "1.0.76" cargo_metadata = "0.18.1" ccli = "0.0.1" -clap = "4.4.11" colored = "2.1.0" etc = "0.1.16" hex = "0.4.3" @@ -66,6 +65,18 @@ zink-codegen = { path = "zink/codegen", version = "0.1.9" } zinkc = { path = "compiler", version = "0.1.9" } zint = { path = "zint", version = "0.1.9" } +[workspace.metadata.conta] +packages = [ + "zabi", + "zingen", + "zinkc", + "filetests", + "zint", + "zink-codegen", + "zink", + "elko" +] + # Zink Programming Language # ------------------------- diff --git a/Conta.toml b/Conta.toml deleted file mode 100644 index 088017e24..000000000 --- a/Conta.toml +++ /dev/null @@ -1,10 +0,0 @@ -packages = [ - "zabi", - "zingen", - "zinkc", - "filetests", - "zint", - "zink-codegen", - "zink", - "elko" -] diff --git a/README.md b/README.md index eab7ad2c6..beb84fae3 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,7 @@ [![telegram][telegram-badge]][telegram-group] [The Zink project][book] mainly provides a singlepass compiler `zinkc` which compiles -WASM to EVM bytecode, the source code of your smart contract could be any language you -like! +WASM to EVM bytecode, the source code of your smart contracts could be any language you like! ```mermaid flowchart LR diff --git a/RELEASES.md b/RELEASES.md index e713d2a3f..80db66d47 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -8,6 +8,7 @@ - Remove ethers - Move out ccli and conta - Use `anyhow::Result` instead for the result of `zint` +- Remove clap in elko ### FIXED diff --git a/elko/Cargo.toml b/elko/Cargo.toml index 06463f044..726fb8ee2 100644 --- a/elko/Cargo.toml +++ b/elko/Cargo.toml @@ -11,7 +11,6 @@ repository.workspace = true [dependencies] anyhow.workspace = true ccli.workspace = true -clap = { workspace = true, features = [ "derive" ] } cargo_metadata.workspace = true colored.workspace = true etc.workspace = true diff --git a/elko/src/bin/elko.rs b/elko/src/bin/elko.rs index 51465bd81..2493bffe4 100644 --- a/elko/src/bin/elko.rs +++ b/elko/src/bin/elko.rs @@ -1,7 +1,10 @@ //! The package manager of zink. #![deny(missing_docs)] -use ccli::{clap::Subcommand, App, Parser, Result}; +use ccli::{ + clap::{self, Parser, Subcommand}, + App, Result, +}; use elko::{Build, Compile, New}; /// Elko commands diff --git a/elko/src/build.rs b/elko/src/build.rs index c3744e92b..4b13e8124 100644 --- a/elko/src/build.rs +++ b/elko/src/build.rs @@ -1,7 +1,7 @@ //! Command `Build`. use crate::utils::WasmBuilder; use anyhow::{anyhow, Result}; -use clap::Parser; +use ccli::clap::{self, Parser}; use etc::{Etc, FileSystem}; use std::{env, fs, path::PathBuf}; use zinkc::Compiler; diff --git a/elko/src/new.rs b/elko/src/new.rs index bdbf4c23b..1558fe7a9 100644 --- a/elko/src/new.rs +++ b/elko/src/new.rs @@ -1,7 +1,7 @@ //! Command `New` use crate::utils::Manifest; use anyhow::{anyhow, Result}; -use clap::Parser; +use ccli::clap::{self, Parser}; use colored::*; use std::{fs, path::PathBuf};