Skip to content

Commit

Permalink
ci(conta): use conta from crates.io (#204)
Browse files Browse the repository at this point in the history
* ci(conta): install conta in CI

* chore(elko): remove clap
  • Loading branch information
clearloop authored Dec 23, 2023
1 parent e7a060f commit dda46c5
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 23 deletions.
16 changes: 16 additions & 0 deletions .github/actions/install-conta/action.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
# -------------------------

Expand Down
10 changes: 0 additions & 10 deletions Conta.toml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion elko/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion elko/src/bin/elko.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion elko/src/build.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion elko/src/new.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down

0 comments on commit dda46c5

Please sign in to comment.