Skip to content

Commit 224da06

Browse files
authored
Use workspace publishing (#78)
* Use workspace publishing * Omit version field from dev-deps
1 parent 6244ab4 commit 224da06

3 files changed

Lines changed: 9 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,20 @@ jobs:
77
check-version:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
- name: Check version
1212
run: |
1313
TAG_VERSION=$(echo ${GITHUB_REF#refs/tags/v})
1414
CRATE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
1515
test "$TAG_VERSION" = "$CRATE_VERSION"
16+
1617
publish:
18+
name: Publish to crates.io
1719
runs-on: ubuntu-latest
1820
needs: check-version
1921
env:
20-
CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}"
22+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2123
steps:
22-
- uses: actions/checkout@v3
23-
- name: Publish derive crate
24-
run: cargo publish -p ethereum_ssz_derive
25-
# `ethereum_ssz` depends on `ethereum_ssz_derive` to publish, so sleep a
26-
# bit to give crates.io some time to update.
27-
- name: Sleep for 3 minutes
28-
run: sleep 180s
29-
shell: bash
30-
- name: Publish main crate
31-
run: cargo publish -p ethereum_ssz
24+
- uses: actions/checkout@v4
25+
- name: Publish all crates in the workspace
26+
run: cargo publish --workspace

ssz/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ context_deserialize = { version = "0.2", optional = true }
3030

3131
[dev-dependencies]
3232
alloy-primitives = { version = "1", features = ["getrandom"] }
33-
ethereum_ssz_derive.workspace = true
33+
ethereum_ssz_derive = { path = "../ssz_derive" }
3434
serde_json = "1"

ssz_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ quote = "1"
2121
darling = "0.23"
2222

2323
[dev-dependencies]
24-
ethereum_ssz.workspace = true
24+
ethereum_ssz = { path = "../ssz" }

0 commit comments

Comments
 (0)