From 46abb880d868d95ea33ccd92c6fc86c59398b7c5 Mon Sep 17 00:00:00 2001 From: Valentin <77051586+vkgnosis@users.noreply.github.com> Date: Thu, 14 Jan 2021 12:24:34 +0100 Subject: [PATCH] Relase to crates.io from github actions (#450) * Relase to crates.io from github actions * bump version --- .github/workflows/release.yaml | 10 ++++++++++ .travis.yml | 11 ----------- ci/deploy.sh | 9 +++++++-- ethcontract-common/Cargo.toml | 2 +- ethcontract-derive/Cargo.toml | 6 +++--- ethcontract-generate/Cargo.toml | 4 ++-- ethcontract/Cargo.toml | 6 +++--- 7 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/release.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..c1b4846d --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,10 @@ +name: release +on: + release: + types: [published] +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: ci/deploy.sh --tag ${GITHUB_REF#refs/tags/} --token ${{ secrets.CARGO_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 014c33d6..00000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -if: branch = main AND tag IS present - -os: linux -dist: focal -language: rust -rust: stable - -script: skip -deploy: - provider: script - script: bash ci/deploy.sh diff --git a/ci/deploy.sh b/ci/deploy.sh index e92ddd46..37ce05f6 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -2,8 +2,8 @@ set -e -token=$CARGO_TOKEN -tag=$TRAVIS_TAG +token="" +tag="" options="" while [[ $# -gt 0 ]]; do case $1 in @@ -37,6 +37,11 @@ EOF shift done +if [[ -z "$tag" || -z "$token" ]]; then + >&2 echo "ERROR: missing tag and/or token parameters" + exit 1 +fi + function check_manifest_version { version=$(cat $1 | grep '^version' | sed -n 's/version = "\(.*\)"/v\1/p') if [[ ! $version = $tag ]]; then diff --git a/ethcontract-common/Cargo.toml b/ethcontract-common/Cargo.toml index 3f3b07b1..0b0c9de9 100644 --- a/ethcontract-common/Cargo.toml +++ b/ethcontract-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethcontract-common" -version = "0.10.0" +version = "0.10.1" authors = ["Nicholas Rodrigues Lordello "] edition = "2018" license = "MIT OR Apache-2.0" diff --git a/ethcontract-derive/Cargo.toml b/ethcontract-derive/Cargo.toml index d83098d6..53c96f2e 100644 --- a/ethcontract-derive/Cargo.toml +++ b/ethcontract-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethcontract-derive" -version = "0.10.0" +version = "0.10.1" authors = ["Nicholas Rodrigues Lordello "] edition = "2018" license = "MIT OR Apache-2.0" @@ -15,8 +15,8 @@ Proc macro for generating type-safe bindings to Ethereum smart contracts. proc-macro = true [dependencies] -ethcontract-common = { version = "0.10.0", path = "../ethcontract-common" } -ethcontract-generate = { version = "0.10.0", path = "../ethcontract-generate" } +ethcontract-common = { version = "0.10.1", path = "../ethcontract-common" } +ethcontract-generate = { version = "0.10.1", path = "../ethcontract-generate" } proc-macro2 = "1.0" quote = "1.0" syn = "1.0.12" diff --git a/ethcontract-generate/Cargo.toml b/ethcontract-generate/Cargo.toml index 4533ae59..b070d472 100644 --- a/ethcontract-generate/Cargo.toml +++ b/ethcontract-generate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethcontract-generate" -version = "0.10.0" +version = "0.10.1" authors = ["Nicholas Rodrigues Lordello "] edition = "2018" license = "MIT OR Apache-2.0" @@ -14,7 +14,7 @@ Code generation for type-safe bindings to Ethereum smart contracts. [dependencies] anyhow = "1.0" curl = "0.4" -ethcontract-common = { version = "0.10.0", path = "../ethcontract-common" } +ethcontract-common = { version = "0.10.1", path = "../ethcontract-common" } Inflector = "0.11" proc-macro2 = "1.0" quote = "1.0" diff --git a/ethcontract/Cargo.toml b/ethcontract/Cargo.toml index 45e88057..f061fb3b 100644 --- a/ethcontract/Cargo.toml +++ b/ethcontract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethcontract" -version = "0.10.0" +version = "0.10.1" authors = ["Nicholas Rodrigues Lordello "] edition = "2018" license = "MIT OR Apache-2.0" @@ -25,8 +25,8 @@ ws-tokio = ["web3/ws-tokio"] ws-tls-tokio = ["web3/ws-tls-tokio"] [dependencies] -ethcontract-common = { version = "0.10.0", path = "../ethcontract-common" } -ethcontract-derive = { version = "0.10.0", path = "../ethcontract-derive", optional = true} +ethcontract-common = { version = "0.10.1", path = "../ethcontract-common" } +ethcontract-derive = { version = "0.10.1", path = "../ethcontract-derive", optional = true} futures = "0.3" futures-timer = "3.0" hex = "0.4"