From efa94b4ba18ab506954f4af5ff965c21c0725df2 Mon Sep 17 00:00:00 2001 From: ErikssonJoakim <75730728+ErikssonJoakim@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:21:11 +0200 Subject: [PATCH 1/7] build(manifest): add missing manifest fields --- Cargo.toml | 19 ++++++++++++------- contracts/axone-cognitarium/Cargo.toml | 9 ++++++++- contracts/axone-dataverse/Cargo.toml | 9 ++++++++- contracts/axone-law-stone/Cargo.toml | 9 ++++++++- contracts/axone-objectarium/Cargo.toml | 13 ++++++++++++- packages/axone-cognitarium-client/Cargo.toml | 9 ++++++++- packages/axone-logic-bindings/Cargo.toml | 9 ++++++++- packages/axone-objectarium-client/Cargo.toml | 9 ++++++++- packages/axone-rdf/Cargo.toml | 9 ++++++++- packages/axone-wasm/Cargo.toml | 13 ++++++++++++- 10 files changed, 92 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 332d9f56..8a528baa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,11 @@ members = ["contracts/*", "packages/*"] resolver = "2" +[workspace.package] +authors = ["AXONE"] +homepage = "https://axone.xyz/" +license-file = "LICENSE" + [profile.release] codegen-units = 1 debug = false @@ -16,15 +21,15 @@ rpath = false [workspace.dependencies] axone-cognitarium = { path = "contracts/axone-cognitarium", features = [ "library", -] } -axone-cognitarium-client = { path = "packages/axone-cognitarium-client" } -axone-logic-bindings = { path = "packages/axone-logic-bindings" } +], version = "5.0.0" } +axone-cognitarium-client = { path = "packages/axone-cognitarium-client", version = "5.0.0" } +axone-logic-bindings = { path = "packages/axone-logic-bindings", version = "5.0.0" } axone-objectarium = { path = "contracts/axone-objectarium", features = [ "library", -] } -axone-objectarium-client = { path = "packages/axone-objectarium-client" } -axone-rdf = { path = "packages/axone-rdf" } -axone-wasm = { path = "packages/axone-wasm" } +], version = "5.0.0" } +axone-objectarium-client = { path = "packages/axone-objectarium-client", version = "5.0.0" } +axone-rdf = { path = "packages/axone-rdf", version = "5.0.0" } +axone-wasm = { path = "packages/axone-wasm", version = "5.0.0" } cosmwasm-schema = "1.5.5" cosmwasm-std = { version = "1.5.5", features = ["cosmwasm_1_2"] } cosmwasm-storage = "1.5.2" diff --git a/contracts/axone-cognitarium/Cargo.toml b/contracts/axone-cognitarium/Cargo.toml index fef5e3e0..6134ee17 100644 --- a/contracts/axone-cognitarium/Cargo.toml +++ b/contracts/axone-cognitarium/Cargo.toml @@ -1,7 +1,14 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = ["cryptography::cryptocurrencies"] +description = "A CosmWasm Smart Contract which enables the storage and querying of Semantic data using RDF (Resource Description Framework), which represents information as semantic triples." +documentation = "https://docs.axone.xyz/contracts/okp4-cognitarium" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-cognitarium" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/contracts/axone-cognitarium" rust-version = "1.75" version = "5.0.0" diff --git a/contracts/axone-dataverse/Cargo.toml b/contracts/axone-dataverse/Cargo.toml index b52b1965..03ea8528 100644 --- a/contracts/axone-dataverse/Cargo.toml +++ b/contracts/axone-dataverse/Cargo.toml @@ -1,7 +1,14 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = ["cryptography::cryptocurrencies"] +description = 'A CosmWasm Smart Contract which enables the orchestration of "Dataverses", a collection of digital resources governed by rules set by what is called a "Zone".' +documentation = "https://docs.axone.xyz/contracts/okp4-dataverse" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-dataverse" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/contracts/axone-dataverse" rust-version = "1.75" version = "5.0.0" diff --git a/contracts/axone-law-stone/Cargo.toml b/contracts/axone-law-stone/Cargo.toml index c70a3323..d95a15ca 100644 --- a/contracts/axone-law-stone/Cargo.toml +++ b/contracts/axone-law-stone/Cargo.toml @@ -1,7 +1,14 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = ["cryptography::cryptocurrencies"] +description = "A CosmWasm Smart Contract which aims to provide GaaS (Governance as a Service) in any Cosmos blockchains." +documentation = "https://docs.axone.xyz/contracts/okp4-law-stone" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-law-stone" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/contracts/axone-law-stone" rust-version = "1.75" version = "5.0.0" diff --git a/contracts/axone-objectarium/Cargo.toml b/contracts/axone-objectarium/Cargo.toml index b54b5f7a..3964ac98 100644 --- a/contracts/axone-objectarium/Cargo.toml +++ b/contracts/axone-objectarium/Cargo.toml @@ -1,7 +1,18 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = [ + "cryptography::cryptocurrencies", + "data-structures", + "database-implementations", +] +description = "A CosmWasm Smart Contract which enables the storage of arbitrary unstructured Objects in any Cosmos blockchains." +documentation = "https://docs.axone.xyz/contracts/okp4-objectarium" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-objectarium" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/contracts/axone-objectarium" rust-version = "1.75" version = "5.0.0" diff --git a/packages/axone-cognitarium-client/Cargo.toml b/packages/axone-cognitarium-client/Cargo.toml index 519f8cd4..9ae27fd1 100644 --- a/packages/axone-cognitarium-client/Cargo.toml +++ b/packages/axone-cognitarium-client/Cargo.toml @@ -1,7 +1,14 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = ["cryptography::cryptocurrencies"] +description = "Package that holds components to interact with the `axone-cognitarium` contract." +documentation = "https://docs.axone.xyz/contracts/okp4-cognitarium" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-cognitarium-client" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/packages/axone-cognitarium-client" version = "5.0.0" [dependencies] diff --git a/packages/axone-logic-bindings/Cargo.toml b/packages/axone-logic-bindings/Cargo.toml index f0c38231..a649e00f 100644 --- a/packages/axone-logic-bindings/Cargo.toml +++ b/packages/axone-logic-bindings/Cargo.toml @@ -1,7 +1,14 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = ["cryptography::cryptocurrencies"] +description = "Package that holds all bindings for querying the AXONE logic module." +documentation = "https://docs.axone.xyz/modules/logic" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-logic-bindings" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/packages/axone-logic-bindings" version = "5.0.0" [dependencies] diff --git a/packages/axone-objectarium-client/Cargo.toml b/packages/axone-objectarium-client/Cargo.toml index 73a7788d..e65d89bf 100644 --- a/packages/axone-objectarium-client/Cargo.toml +++ b/packages/axone-objectarium-client/Cargo.toml @@ -1,7 +1,14 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = ["cryptography::cryptocurrencies"] +description = "Package that holds components to interact with the `axone-objectarium` contract." +documentation = "https://docs.axone.xyz/contracts/okp4-objectarium" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-objectarium-client" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/packages/axone-objectarium-client" version = "5.0.0" [dependencies] diff --git a/packages/axone-rdf/Cargo.toml b/packages/axone-rdf/Cargo.toml index ce60bf1a..dd3cf0c7 100644 --- a/packages/axone-rdf/Cargo.toml +++ b/packages/axone-rdf/Cargo.toml @@ -1,7 +1,14 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = ["data-structures", "parser-implementations"] +description = "Package that holds useful components to manage with `RDF` data, typically reading / writing." +documentation = "https://docs.axone.xyz/contracts/okp4-cognitarium#model-your-data-with-rdf" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-rdf" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/packages/axone-rdf" version = "5.0.0" [dependencies] diff --git a/packages/axone-wasm/Cargo.toml b/packages/axone-wasm/Cargo.toml index 0b7ac9e5..b039fcd5 100644 --- a/packages/axone-wasm/Cargo.toml +++ b/packages/axone-wasm/Cargo.toml @@ -1,7 +1,18 @@ [package] -authors = ["AXONE"] +authors.workspace = true +categories = [ + "cryptography::cryptocurrencies", + "parser-implementations", + "data-structures", +] +description = "Package that holds useful components to manage with `CosmWasm` data, typically reading / writing." +documentation = "https://docs.axone.xyz/predicates/open_4#cosmwasm-uri" edition = "2021" +homepage.workspace = true +license-file.workspace = true name = "axone-wasm" +readme = "README.md" +repository = "https://github.com/axone-protocol/contracts/tree/main/packages/axone-wasm" version = "5.0.0" [dependencies] From 8fe5408c1591ee70769ad3147d98ff2a7f6f61ce Mon Sep 17 00:00:00 2001 From: ErikssonJoakim <75730728+ErikssonJoakim@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:22:37 +0200 Subject: [PATCH 2/7] docs(axone-wasm): minor correction of readme --- packages/axone-wasm/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/axone-wasm/README.md b/packages/axone-wasm/README.md index 7cb11c7a..f55036e1 100644 --- a/packages/axone-wasm/README.md +++ b/packages/axone-wasm/README.md @@ -1,3 +1,3 @@ -# RDF +# WASM -Package that holds useful components to manage with `RDF` data, typically reading / writing. +Package that holds useful components to manage with `CosmWasm` data, typically reading / writing. From 593b2e62b797a45a12c1ef3a3ac2b79b5348fca1 Mon Sep 17 00:00:00 2001 From: ErikssonJoakim <75730728+ErikssonJoakim@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:23:25 +0200 Subject: [PATCH 3/7] ci: update workspace dependency versions on semantic release --- .releaserc.yml | 5 ++++- Makefile.toml | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.releaserc.yml b/.releaserc.yml index f3b1e3b1..afe34eee 100644 --- a/.releaserc.yml +++ b/.releaserc.yml @@ -37,7 +37,10 @@ plugins: to: version = "${nextRelease.version}" - - "@semantic-release/exec" - prepareCmd: | - cargo make schema && cargo make docs-generate && cargo make release-wasm + cargo make update-workspace-dependency-versions ${nextRelease.version} && \ + cargo make schema && \ + cargo make docs-generate && \ + cargo make release-wasm - - "@semantic-release/github" - successComment: false assets: diff --git a/Makefile.toml b/Makefile.toml index cf815d52..184207cc 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -600,6 +600,19 @@ docker run --rm \ | jq -r '.' ''' +[tasks.update-workspace-dependency-versions] +dependencies = ["install-toml-cli"] +script = ''' +next_version=$1 +toml set Cargo.toml workspace.dependencies.axone-cognitarium.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +toml set Cargo.toml workspace.dependencies.axone-rdf.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +toml set Cargo.toml workspace.dependencies.axone-wasm.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +toml set Cargo.toml workspace.dependencies.axone-cognitarium-client.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +toml set Cargo.toml workspace.dependencies.axone-logic-bindings.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +toml set Cargo.toml workspace.dependencies.axone-objectarium.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +toml set Cargo.toml workspace.dependencies.axone-objectarium-client.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +''' + [tasks.install-llvm-tools-preview] install_crate = { rustup_component_name = "llvm-tools-preview" } @@ -637,6 +650,9 @@ fi [tasks.install-cargo-hack] install_crate = { crate_name = "cargo-hack", min_version = "0.6.14" } +[tasks.install-toml-cli] +install_crate = { crate_name = "toml-cli", min_version = "0.2.3" } + [config] default_to_workspace = false min_version = "0.36.3" From 0eb2748ed7c613f5d179b0aa5295805d01c8d58c Mon Sep 17 00:00:00 2001 From: ErikssonJoakim <75730728+ErikssonJoakim@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:31:31 +0200 Subject: [PATCH 4/7] ci: publish crates on on tag push --- .github/workflows/publish.yml | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..1073c868 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,62 @@ +name: Publish + +on: + push: + tags: + - "**" + +jobs: + lint: + if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik' + uses: ./.github/workflows/lint.yml + + build: + if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik' + uses: ./.github/workflows/build.yml + + test: + if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik' + uses: ./.github/workflows/test.yml + + perform-publish: + if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik' + needs: + - lint + - build + - test + runs-on: ubuntu-22.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.OPS_TOKEN }} + + - name: Setup rust + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.75 + default: true + override: true + + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v2 + with: + cmake-version: "3.29.0" + + - name: Cargo install smart-release + run: cargo install cargo-smart-release + + - name: Publish crates to crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: | + cargo smart-release --execute --update-crates-index --no-push --no-changelog --no-changelog-github-release \ + axone-rdf \ + axone-wasm \ + axone-objectarium-client \ + axone-logic-bindings \ + axone-cognitarium-client \ + axone-objectarium \ + axone-cognitarium \ + axone-law-stone \ + axone-dataverse From e777c9614dc1f09ac05fa2bca73d092775976d19 Mon Sep 17 00:00:00 2001 From: ErikssonJoakim <75730728+ErikssonJoakim@users.noreply.github.com> Date: Sun, 7 Jul 2024 08:59:09 +0200 Subject: [PATCH 5/7] refactor: improve update workspace dependency versions script readability --- Makefile.toml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 184207cc..7a19a440 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -604,13 +604,20 @@ docker run --rm \ dependencies = ["install-toml-cli"] script = ''' next_version=$1 -toml set Cargo.toml workspace.dependencies.axone-cognitarium.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml -toml set Cargo.toml workspace.dependencies.axone-rdf.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml -toml set Cargo.toml workspace.dependencies.axone-wasm.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml -toml set Cargo.toml workspace.dependencies.axone-cognitarium-client.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml -toml set Cargo.toml workspace.dependencies.axone-logic-bindings.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml -toml set Cargo.toml workspace.dependencies.axone-objectarium.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml -toml set Cargo.toml workspace.dependencies.axone-objectarium-client.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml + +workspace_dependencies=( \ + axone-cognitarium \ + axone-rdf \ + axone-wasm \ + axone-cognitarium-client \ + axone-logic-bindings \ + axone-objectarium \ + axone-objectarium-client \ +) + +for workspace_dependency in ${workspace_dependencies[@]}; do + toml set Cargo.toml workspace.dependencies.$workspace_dependency.version $next_version > Cargo.toml.tmp && mv Cargo.toml.tmp Cargo.toml +done ''' [tasks.install-llvm-tools-preview] From 584d956f3529b965f7a85d042c506e03ff94134e Mon Sep 17 00:00:00 2001 From: ErikssonJoakim <75730728+ErikssonJoakim@users.noreply.github.com> Date: Sun, 14 Jul 2024 01:28:16 +0200 Subject: [PATCH 6/7] ci: change publishing tool to crate workspaces --- .github/workflows/publish.yml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1073c868..2872e83f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,25 +38,7 @@ jobs: default: true override: true - - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v2 - with: - cmake-version: "3.29.0" - - - name: Cargo install smart-release - run: cargo install cargo-smart-release - - name: Publish crates to crates.io env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - run: | - cargo smart-release --execute --update-crates-index --no-push --no-changelog --no-changelog-github-release \ - axone-rdf \ - axone-wasm \ - axone-objectarium-client \ - axone-logic-bindings \ - axone-cognitarium-client \ - axone-objectarium \ - axone-cognitarium \ - axone-law-stone \ - axone-dataverse + run: cargo workspaces publish --publish-as-is --allow-branch main From 8e677251ef40960006194eaf3cd6912ce7e42c18 Mon Sep 17 00:00:00 2001 From: ErikssonJoakim <75730728+ErikssonJoakim@users.noreply.github.com> Date: Sun, 14 Jul 2024 01:28:56 +0200 Subject: [PATCH 7/7] ci: create publishing task --- .github/workflows/publish.yml | 2 +- Makefile.toml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2872e83f..c0a648ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -41,4 +41,4 @@ jobs: - name: Publish crates to crates.io env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - run: cargo workspaces publish --publish-as-is --allow-branch main + run: cargo make publish-crates diff --git a/Makefile.toml b/Makefile.toml index 7a19a440..1747be72 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -620,6 +620,10 @@ for workspace_dependency in ${workspace_dependencies[@]}; do done ''' +[tasks.publish-crates] +dependencies = ["install-cargo-workspaces"] +script = "cargo workspaces publish --publish-as-is" + [tasks.install-llvm-tools-preview] install_crate = { rustup_component_name = "llvm-tools-preview" } @@ -660,6 +664,9 @@ install_crate = { crate_name = "cargo-hack", min_version = "0.6.14" } [tasks.install-toml-cli] install_crate = { crate_name = "toml-cli", min_version = "0.2.3" } +[tasks.install-cargo-workspaces] +install_crate = { crate_name = "cargo-workspaces", min_version = "0.3.2" } + [config] default_to_workspace = false min_version = "0.36.3"