Skip to content

Commit f0498dc

Browse files
authored
Merge pull request #250 from mikeee/dry-publish
ci: add dry publish test
2 parents 4da565c + abecc5c commit f0498dc

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

.github/workflows/ci.yml

+35-5
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,43 @@ jobs:
9494
- uses: dtolnay/install@cargo-docs-rs
9595
- run: cargo docs-rs -p ${{ matrix.crate }}
9696

97+
publish-dry:
98+
name: Publish Test
99+
runs-on: ubuntu-latest
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
crate:
104+
- dapr
105+
- dapr-macros
106+
107+
steps:
108+
- name: Install Rust
109+
uses: dtolnay/rust-toolchain@master
110+
with:
111+
toolchain: stable
112+
components: clippy, rustfmt
113+
- name: Install Protoc
114+
uses: arduino/setup-protoc@v3
115+
with:
116+
repo-token: ${{ secrets.GITHUB_TOKEN }}
117+
version: ${{ env.PROTOC_VERSION }}
118+
- uses: actions/checkout@v4
119+
- name: cargo publish - ${{ matrix.crate }}
120+
run: cargo publish --manifest-path ${{ matrix.crate }}/Cargo.toml --dry-run
121+
122+
97123
publish:
98124
name: Publish
99125
runs-on: ubuntu-latest
100-
needs: [test-docs, lint, build]
126+
needs: [test-docs, lint, build, publish-dry]
101127
if: startswith(github.ref, 'refs/tags/v')
128+
strategy:
129+
fail-fast: false
130+
matrix:
131+
crate:
132+
- dapr
133+
- dapr-macros
102134

103135
steps:
104136
- name: Install Rust
@@ -112,7 +144,5 @@ jobs:
112144
repo-token: ${{ secrets.GITHUB_TOKEN }}
113145
version: ${{ env.PROTOC_VERSION }}
114146
- uses: actions/checkout@v4
115-
- name: cargo publish dapr-macros
116-
run: cargo publish --manifest-path dapr-macros/Cargo.toml --token ${{ env.CARGO_TOKEN }}
117-
- name: cargo publish dapr
118-
run: cargo publish --manifest-path dapr/Cargo.toml --token ${{ env.CARGO_TOKEN }}
147+
- name: cargo publish - ${{ matrix.crate }}
148+
run: cargo publish --manifest-path ${{ matrix.crate }}/Cargo.toml --token ${{ env.CARGO_TOKEN }}

0 commit comments

Comments
 (0)