mirror of https://github.com/dapr/rust-sdk.git
ci: add dry publish test
Signed-off-by: Mike Nguyen <hey@mike.ee>
This commit is contained in:
parent
4da565cbae
commit
abecc5c70b
|
@ -94,11 +94,43 @@ jobs:
|
|||
- uses: dtolnay/install@cargo-docs-rs
|
||||
- run: cargo docs-rs -p ${{ matrix.crate }}
|
||||
|
||||
publish-dry:
|
||||
name: Publish Test
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
crate:
|
||||
- dapr
|
||||
- dapr-macros
|
||||
|
||||
steps:
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ env.PROTOC_VERSION }}
|
||||
- uses: actions/checkout@v4
|
||||
- name: cargo publish - ${{ matrix.crate }}
|
||||
run: cargo publish --manifest-path ${{ matrix.crate }}/Cargo.toml --dry-run
|
||||
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test-docs, lint, build]
|
||||
needs: [test-docs, lint, build, publish-dry]
|
||||
if: startswith(github.ref, 'refs/tags/v')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
crate:
|
||||
- dapr
|
||||
- dapr-macros
|
||||
|
||||
steps:
|
||||
- name: Install Rust
|
||||
|
@ -112,7 +144,5 @@ jobs:
|
|||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ env.PROTOC_VERSION }}
|
||||
- uses: actions/checkout@v4
|
||||
- name: cargo publish dapr-macros
|
||||
run: cargo publish --manifest-path dapr-macros/Cargo.toml --token ${{ env.CARGO_TOKEN }}
|
||||
- name: cargo publish dapr
|
||||
run: cargo publish --manifest-path dapr/Cargo.toml --token ${{ env.CARGO_TOKEN }}
|
||||
- name: cargo publish - ${{ matrix.crate }}
|
||||
run: cargo publish --manifest-path ${{ matrix.crate }}/Cargo.toml --token ${{ env.CARGO_TOKEN }}
|
||||
|
|
Loading…
Reference in New Issue