From c63fc02a5a836dd51c448533120fcd52f3e4511f Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Mon, 24 Mar 2025 18:40:08 +0000 Subject: [PATCH] Prepare v0.8.0 (#672) * chore: Bump cdk dependency to v0.8.0 * chore: add docker publish to ci * chore: add doc test build to ci --- .github/workflows/ci.yml | 20 ++++++++- .github/workflows/docker-publish.yml | 60 +++++++++++++++++++++++++ Cargo.toml | 25 ++++++----- crates/cashu/Cargo.toml | 4 +- crates/cdk-axum/Cargo.toml | 4 +- crates/cdk-cli/Cargo.toml | 2 +- crates/cdk-cln/Cargo.toml | 8 ++-- crates/cdk-common/Cargo.toml | 4 +- crates/cdk-fake-wallet/Cargo.toml | 8 ++-- crates/cdk-integration-tests/Cargo.toml | 30 ++++++------- crates/cdk-lnbits/Cargo.toml | 8 ++-- crates/cdk-lnd/Cargo.toml | 7 +-- crates/cdk-mint-rpc/Cargo.toml | 8 ++-- crates/cdk-mintd/Cargo.toml | 8 ++-- crates/cdk-payment-processor/Cargo.toml | 8 ++-- crates/cdk-redb/Cargo.toml | 8 ++-- crates/cdk-rexie/Cargo.toml | 8 ++-- crates/cdk-sqlite/Cargo.toml | 8 ++-- crates/cdk/Cargo.toml | 10 ++--- justfile | 3 +- 20 files changed, 160 insertions(+), 81 deletions(-) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8180094c..3a8461dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,8 @@ on: branches: [main] pull_request: branches: [main] + release: + types: [created] env: CARGO_TERM_COLOR: always @@ -388,4 +390,20 @@ jobs: - name: Stop and clean up Docker Compose run: | docker compose -f misc/keycloak/docker-compose-recover.yml down - + + doc-tests: + name: "Documentation Tests" + runs-on: ubuntu-latest + timeout-minutes: 15 + needs: pre-commit-checks + steps: + - name: checkout + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v11 + - name: Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@v6 + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Run doc tests + run: nix develop -i -L .#stable --command cargo test --doc diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 00000000..4d3d13a4 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,60 @@ +name: Publish Docker Image + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: 'Tag to build and publish' + required: true + default: 'latest' + +env: + REGISTRY: docker.io + IMAGE_NAME: thesimplekid/cdk-mintd + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest,enable=${{ github.event_name == 'release' }} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=ref,event=branch + type=ref,event=pr + type=sha + ${{ github.event.inputs.tag != '' && github.event.inputs.tag || '' }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Cargo.toml b/Cargo.toml index cfa003d7..88c9cc92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ rust-version = "1.75.0" license = "MIT" homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" +version = "0.8.0" [workspace.dependencies] anyhow = "1" @@ -18,18 +19,18 @@ axum = { version = "0.8.1", features = ["ws"] } bitcoin = { version = "0.32.2", features = ["base64", "serde", "rand", "rand-std"] } bip39 = { version = "2.0", features = ["rand"] } jsonwebtoken = "9.2.0" -cashu = { path = "./crates/cashu", version = "=0.7.1" } -cdk = { path = "./crates/cdk", default-features = false, version = "=0.7.2" } -cdk-common = { path = "./crates/cdk-common", default-features = false, version = "=0.7.1" } -cdk-axum = { path = "./crates/cdk-axum", default-features = false, version = "=0.7.1" } -cdk-cln = { path = "./crates/cdk-cln", version = "=0.7.1" } -cdk-lnbits = { path = "./crates/cdk-lnbits", version = "=0.7.1" } -cdk-lnd = { path = "./crates/cdk-lnd", version = "=0.7.1" } -cdk-fake-wallet = { path = "./crates/cdk-fake-wallet", version = "=0.7.1" } -cdk-payment-processor = { path = "./crates/cdk-payment-processor", default-features = true, version = "=0.7.1" } -cdk-mint-rpc = { path = "./crates/cdk-mint-rpc", version = "=0.7.1" } -cdk-redb = { path = "./crates/cdk-redb", default-features = true, version = "=0.7.1" } -cdk-sqlite = { path = "./crates/cdk-sqlite", default-features = true, version = "=0.7.1" } +cashu = { path = "./crates/cashu", version = "=0.8.0" } +cdk = { path = "./crates/cdk", default-features = false, version = "=0.8.0" } +cdk-common = { path = "./crates/cdk-common", default-features = false, version = "=0.8.0" } +cdk-axum = { path = "./crates/cdk-axum", default-features = false, version = "=0.8.0" } +cdk-cln = { path = "./crates/cdk-cln", version = "=0.8.0" } +cdk-lnbits = { path = "./crates/cdk-lnbits", version = "=0.8.0" } +cdk-lnd = { path = "./crates/cdk-lnd", version = "=0.8.0" } +cdk-fake-wallet = { path = "./crates/cdk-fake-wallet", version = "=0.8.0" } +cdk-payment-processor = { path = "./crates/cdk-payment-processor", default-features = true, version = "=0.8.0" } +cdk-mint-rpc = { path = "./crates/cdk-mint-rpc", version = "=0.8.0" } +cdk-redb = { path = "./crates/cdk-redb", default-features = true, version = "=0.8.0" } +cdk-sqlite = { path = "./crates/cdk-sqlite", default-features = true, version = "=0.8.0" } clap = { version = "4.5.31", features = ["derive"] } ciborium = { version = "0.2.2", default-features = false, features = ["std"] } cbor-diag = "0.1.12" diff --git a/crates/cashu/Cargo.toml b/crates/cashu/Cargo.toml index f6856aa1..7303e349 100644 --- a/crates/cashu/Cargo.toml +++ b/crates/cashu/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "cashu" -version = "0.7.1" +version.workspace = true edition.workspace = true authors = ["CDK Developers"] description = "Cashu shared types and crypto utilities, used as the foundation for the CDK and their crates" homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV license.workspace = true [features] diff --git a/crates/cdk-axum/Cargo.toml b/crates/cdk-axum/Cargo.toml index d1bf6d18..e502bd34 100644 --- a/crates/cdk-axum/Cargo.toml +++ b/crates/cdk-axum/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "cdk-axum" -version = "0.7.1" +version.workspace = true edition.workspace = true license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV description = "Cashu CDK axum webserver" diff --git a/crates/cdk-cli/Cargo.toml b/crates/cdk-cli/Cargo.toml index cc202a3d..24e5bddf 100644 --- a/crates/cdk-cli/Cargo.toml +++ b/crates/cdk-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdk-cli" -version = "0.7.1" +version.workspace = true authors = ["CDK Developers"] description = "Cashu cli wallet built on CDK" license.workspace = true diff --git a/crates/cdk-cln/Cargo.toml b/crates/cdk-cln/Cargo.toml index 7460b0e0..401e9a0a 100644 --- a/crates/cdk-cln/Cargo.toml +++ b/crates/cdk-cln/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "cdk-cln" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV description = "CDK ln backend for cln" [dependencies] diff --git a/crates/cdk-common/Cargo.toml b/crates/cdk-common/Cargo.toml index 1afe6763..f5c55bcf 100644 --- a/crates/cdk-common/Cargo.toml +++ b/crates/cdk-common/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "cdk-common" -version = "0.7.1" +version.workspace = true authors = ["CDK Developers"] description = "CDK common types and traits" homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" edition.workspace = true -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV license.workspace = true [features] diff --git a/crates/cdk-fake-wallet/Cargo.toml b/crates/cdk-fake-wallet/Cargo.toml index 6f12821a..418195d5 100644 --- a/crates/cdk-fake-wallet/Cargo.toml +++ b/crates/cdk-fake-wallet/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "cdk-fake-wallet" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV description = "CDK fake ln backend" [dependencies] diff --git a/crates/cdk-integration-tests/Cargo.toml b/crates/cdk-integration-tests/Cargo.toml index c3375377..84aca04d 100644 --- a/crates/cdk-integration-tests/Cargo.toml +++ b/crates/cdk-integration-tests/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk-integration-tests" -version = "0.7.0" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] description = "Core Cashu Development Kit library implementing the Cashu protocol" -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV [features] @@ -19,14 +19,14 @@ axum.workspace = true rand.workspace = true bip39 = { workspace = true, features = ["rand"] } anyhow.workspace = true -cashu = { path = "../cashu", features = ["mint", "wallet"] } -cdk = { path = "../cdk", features = ["mint", "wallet", "auth"] } -cdk-cln = { path = "../cdk-cln" } -cdk-lnd = { path = "../cdk-lnd" } -cdk-axum = { path = "../cdk-axum" } -cdk-sqlite = { path = "../cdk-sqlite" } -cdk-redb = { path = "../cdk-redb" } -cdk-fake-wallet = { path = "../cdk-fake-wallet" } +cashu = { workspace = true, features = ["mint", "wallet"] } +cdk = { workspace = true, features = ["mint", "wallet", "auth"] } +cdk-cln = { workspace = true } +cdk-lnd = { workspace = true } +cdk-axum = { workspace = true } +cdk-sqlite = { workspace = true } +cdk-redb = { workspace = true } +cdk-fake-wallet = { workspace = true } futures = { workspace = true, default-features = false, features = [ "executor", ] } @@ -55,7 +55,7 @@ instant = { workspace = true, features = ["wasm-bindgen", "inaccurate"] } [dev-dependencies] bip39 = { workspace = true, features = ["rand"] } anyhow.workspace = true -cdk = { path = "../cdk", features = ["mint", "wallet"] } -cdk-axum = { path = "../cdk-axum" } -cdk-fake-wallet = { path = "../cdk-fake-wallet" } +cdk = { workspace = true, features = ["mint", "wallet"] } +cdk-axum = { workspace = true } +cdk-fake-wallet = { workspace = true } tower-http = { workspace = true, features = ["cors"] } diff --git a/crates/cdk-lnbits/Cargo.toml b/crates/cdk-lnbits/Cargo.toml index c5ae0550..2790edc7 100644 --- a/crates/cdk-lnbits/Cargo.toml +++ b/crates/cdk-lnbits/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "cdk-lnbits" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV description = "CDK ln backend for lnbits" [dependencies] diff --git a/crates/cdk-lnd/Cargo.toml b/crates/cdk-lnd/Cargo.toml index 60a7b9a6..07982039 100644 --- a/crates/cdk-lnd/Cargo.toml +++ b/crates/cdk-lnd/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "cdk-lnd" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" +rust-version.workspace = true # MSRV description = "CDK ln backend for lnd" [dependencies] diff --git a/crates/cdk-mint-rpc/Cargo.toml b/crates/cdk-mint-rpc/Cargo.toml index 6aeb1b68..6d3dc2df 100644 --- a/crates/cdk-mint-rpc/Cargo.toml +++ b/crates/cdk-mint-rpc/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk-mint-rpc" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] description = "CDK mintd mint managment RPC client and server" -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV [[bin]] name = "cdk-mint-cli" diff --git a/crates/cdk-mintd/Cargo.toml b/crates/cdk-mintd/Cargo.toml index e02734fd..b47a57bf 100644 --- a/crates/cdk-mintd/Cargo.toml +++ b/crates/cdk-mintd/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk-mintd" -version = "0.7.2" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" description = "CDK mint binary" -rust-version = "1.75.0" +rust-version.workspace = true [features] default = ["management-rpc", "cln", "lnd", "lnbits", "fakewallet", "grpc-processor", "auth"] diff --git a/crates/cdk-payment-processor/Cargo.toml b/crates/cdk-payment-processor/Cargo.toml index e4f546a7..713833fc 100644 --- a/crates/cdk-payment-processor/Cargo.toml +++ b/crates/cdk-payment-processor/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk-payment-processor" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] description = "CDK payment processor" homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV -license = "MIT" +rust-version.workspace = true # MSRV +license.workspace = true [[bin]] name = "cdk-payment-processor" diff --git a/crates/cdk-redb/Cargo.toml b/crates/cdk-redb/Cargo.toml index f33a0040..fd632576 100644 --- a/crates/cdk-redb/Cargo.toml +++ b/crates/cdk-redb/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk-redb" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] description = "Redb storage backend for CDK" -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.81.0" # MSRV +rust-version.workspace = true # MSRV # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] diff --git a/crates/cdk-rexie/Cargo.toml b/crates/cdk-rexie/Cargo.toml index f7047798..a416cf3a 100644 --- a/crates/cdk-rexie/Cargo.toml +++ b/crates/cdk-rexie/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk-rexie" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] description = "Indexdb storage backend for CDK in the browser" -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] diff --git a/crates/cdk-sqlite/Cargo.toml b/crates/cdk-sqlite/Cargo.toml index 856fb443..c2e2cfed 100644 --- a/crates/cdk-sqlite/Cargo.toml +++ b/crates/cdk-sqlite/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk-sqlite" -version = "0.7.1" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] description = "SQLite storage backend for CDK" -license = "MIT" +license.workspace = true homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV +rust-version.workspace = true # MSRV # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] diff --git a/crates/cdk/Cargo.toml b/crates/cdk/Cargo.toml index eb9e5925..11de313e 100644 --- a/crates/cdk/Cargo.toml +++ b/crates/cdk/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "cdk" -version = "0.7.2" -edition = "2021" +version.workspace = true +edition.workspace = true authors = ["CDK Developers"] description = "Core Cashu Development Kit library implementing the Cashu protocol" homepage = "https://github.com/cashubtc/cdk" repository = "https://github.com/cashubtc/cdk.git" -rust-version = "1.75.0" # MSRV -license = "MIT" +rust-version.workspace = true # MSRV +license.workspace = true [features] @@ -40,7 +40,7 @@ futures = { workspace = true, optional = true, features = ["alloc"] } url.workspace = true utoipa = { workspace = true, optional = true } uuid.workspace = true -jsonwebtoken = { version = "9", optional = true } +jsonwebtoken = { workspace = true, optional = true } # -Z minimal-versions sync_wrapper = "0.1.2" diff --git a/justfile b/justfile index b191ec5e..69424d1f 100644 --- a/justfile +++ b/justfile @@ -132,10 +132,9 @@ release m="": "-p cdk-mint-rpc" "-p cdk-cln" "-p cdk-lnd" - "-p cdk-strike" - "-p cdk-phoenixd" "-p cdk-lnbits" "-p cdk-fake-wallet" + "-p cdk-payment-processor" "-p cdk-cli" "-p cdk-mintd" )