Skip to content

Commit bcc2f58

Browse files
authored
Merge pull request #2 from agntcy/feature/publish-crates-io
build: prepare crates.io release workflow
2 parents 5b1e45a + ab601e1 commit bcc2f58

File tree

4 files changed

+84
-44
lines changed

4 files changed

+84
-44
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release-rust.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release Rust Crates
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
release-crates:
11+
name: Release crates
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: read
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
19+
with:
20+
persist-credentials: false
21+
fetch-depth: 0
22+
23+
- name: Setup Rust
24+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
25+
26+
- name: Install protoc
27+
uses: arduino/setup-protoc@v3
28+
with:
29+
repo-token: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Rust cache
32+
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
33+
34+
- name: Run release-plz
35+
uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11 # v0.5.128
36+
with:
37+
command: release
38+
manifest_path: ./Cargo.toml
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
42+
43+
release-crates-pr:
44+
name: Release crates - PR
45+
runs-on: ubuntu-latest
46+
permissions:
47+
contents: write
48+
pull-requests: write
49+
concurrency:
50+
group: release-plz-${{ github.ref }}
51+
cancel-in-progress: false
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
55+
with:
56+
persist-credentials: false
57+
fetch-depth: 0
58+
59+
- name: Setup Rust
60+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
61+
62+
- name: Install protoc
63+
uses: arduino/setup-protoc@v3
64+
with:
65+
repo-token: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Rust cache
68+
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
69+
70+
- name: Run release-plz PR
71+
uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11 # v0.5.128
72+
with:
73+
command: release-pr
74+
manifest_path: ./Cargo.toml
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ resolver = "2"
1212
[workspace.package]
1313
edition = "2024"
1414
license = "Apache-2.0"
15-
repository = "https://github.com/a2a-rs/a2a-rs"
15+
repository = "https://github.com/agntcy/a2a-rs"
1616
rust-version = "1.85"
1717

1818
[workspace.dependencies]
1919
# Internal crates
20-
a2a = { path = "a2a" }
21-
a2a-client = { path = "a2a-client" }
22-
a2a-server = { path = "a2a-server" }
23-
a2a-pb = { path = "a2a-pb" }
24-
a2a-grpc = { path = "a2a-grpc" }
20+
a2a = { path = "a2a", version = "0.1.0" }
21+
a2a-client = { path = "a2a-client", version = "0.1.0" }
22+
a2a-server = { path = "a2a-server", version = "0.1.0" }
23+
a2a-pb = { path = "a2a-pb", version = "0.1.0" }
24+
a2a-grpc = { path = "a2a-grpc", version = "0.1.0" }
2525

2626
# Serialization
2727
serde = { version = "1", features = ["derive"] }

examples/helloworld/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn build_agent_card() -> AgentCard {
8787
version: a2a::VERSION.to_string(),
8888
provider: Some(AgentProvider {
8989
organization: "A2A Rust SDK".to_string(),
90-
url: "https://github.com/a2a-rs/a2a-rs".to_string(),
90+
url: "https://github.com/agntcy/a2a-rs".to_string(),
9191
}),
9292
capabilities: AgentCapabilities {
9393
streaming: Some(true),

0 commit comments

Comments
 (0)