Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/crate-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Bump Rust 🦀 crate version

on:
workflow_dispatch:
inputs:
dist-location:
description: 'Distribution location'
type: choice
options:
- cln-plugin
- cln-rpc
- cln-grpc
default: 'cln-plugin'
required: true

jobs:
bump:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup protoc
uses: arduino/setup-protoc@v3

- name: Setup rust
uses: dtolnay/[email protected]

- name: Install cargo binstall
uses: cargo-bins/cargo-binstall@main

- name: Install cargo-release and cargo-semver-checks
run: |
cargo binstall cargo-release --version 0.25.10
cargo binstall cargo-semver-checks --version 0.36.0

- name: Determine version
id: determine-version
run: |
if cargo semver-checks -p ${{ github.event.inputs.dist-location }} --release-type patch; then
echo "bump=patch" >> $GITHUB_OUTPUT
elif cargo semver-checks -p ${{ github.event.inputs.dist-location }} --release-type minor; then
echo "bump=minor" >> $GITHUB_OUTPUT
elif cargo semver-checks -p ${{ github.event.inputs.dist-location }} --release-type major; then
echo "bump=minor" >> $GITHUB_OUTPUT
else
echo "bump=unknown" >> $GITHUB_OUTPUT
exit 1
fi

- name: Bump version
run: |
cargo release version -p ${{ github.event.inputs.dist-location }} ${{ steps.determine-version.outputs.bump }} --execute --no-confirm

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ github.event.inputs.dist-location }}: Bump the ${{ steps.determine-version.outputs.bump }} version"
title: "${{ github.event.inputs.dist-location }}: Bump the ${{ steps.determine-version.outputs.bump }} version"
body: |
Triggered manually with option: ${{ github.event.inputs.dist-location }}
Version bump determined by `cargo semver-checks`
branch: "${{ github.event.inputs.dist-location }}-version-bump"
base: master
labels: version-bump, automated
delete-branch: true
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ members = [
"plugins/lsps-plugin",
"plugins/wss-proxy-plugin",
]

[workspace.dependencies]
cln-rpc = { path = "cln-rpc", version = "0.4.0" }
cln-grpc = { path = "cln-grpc", version = "0.4.1" }
cln-plugin = { path = "plugins", version = "0.4.0" }
4 changes: 2 additions & 2 deletions cln-grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ server = ["cln-rpc"]
[dependencies]
anyhow = "1.0"
log = "0.4"
cln-rpc = { path = "../cln-rpc/", version = "0.4", optional = true }
cln-rpc = { workspace = true, optional = true }
cfg-if = "1.0"
serde = { version = "1.0", features = ["derive"] }
tonic = { version = "0.11", features = ["tls", "transport"] }
Expand All @@ -29,7 +29,7 @@ tokio-util = "0.7.10"

[dev-dependencies]
serde_json = "1.0.72"
cln-rpc = { path = "../cln-rpc/", version = "0.4" }
cln-rpc = { workspace = true }

[build-dependencies]
tonic-build = "0.11"
2 changes: 1 addition & 1 deletion plugins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ tracing = { version = "^0.1", features = ["async-await", "log"] }

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread", ] }
cln-grpc = { version = "0.4", path = "../cln-grpc" }
cln-grpc = { workspace = true }
6 changes: 3 additions & 3 deletions plugins/grpc-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ anyhow = "1.0"
log = "0.4"
rcgen = { version = "0.13.1", features = ["pem", "x509-parser"] }
prost = "0.12"
cln-grpc = { version = "0.4", features = ["server"], path = "../../cln-grpc"}
cln-plugin = { version = "0.4", path = "../../plugins" }
cln-rpc = { version = "0.4", path = "../../cln-rpc" }
cln-grpc = { workspace = true, features = ["server"]}
cln-plugin = { workspace = true }
cln-rpc = { workspace = true }
serde_json = "1.0.113"

[dependencies.tokio]
Expand Down
4 changes: 2 additions & 2 deletions plugins/lsps-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ path = "src/service.rs"
[dependencies]
anyhow = "1.0"
async-trait = "0.1"
cln-plugin = { version = "0.4", path = "../" }
cln-rpc = { version = "0.4", path = "../../cln-rpc" }
cln-plugin = { workspace = true }
cln-rpc = { workspace = true }
hex = "0.4"
log = "0.4"
rand = "0.9"
Expand Down
4 changes: 2 additions & 2 deletions plugins/rest-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ utoipa = { version = "5", features = ['axum_extras'] }
log-panics = "2"
socketioxide = "0.15"

cln-plugin = { version = "0.4", path = "../../plugins" }
cln-rpc = { version = "0.4", path = "../../cln-rpc" }
cln-plugin = { workspace = true }
cln-rpc = { workspace = true }
utoipa-swagger-ui = { version = "9.0.0", features = ["vendored", "axum"] }

4 changes: 2 additions & 2 deletions plugins/wss-proxy-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ tokio-rustls = { version = "0.26", default-features = false, features = ["ring",

log-panics = "2"

cln-plugin = { version = "0.4", path = "../../plugins" }
cln-rpc = { version = "0.4", path = "../../cln-rpc" }
cln-plugin = { workspace = true }
cln-rpc = { workspace = true }

Loading