Skip to content

Commit

Permalink
Merge pull request #250 from mikeee/dry-publish
Browse files Browse the repository at this point in the history
ci: add dry publish test
  • Loading branch information
mikeee authored Nov 25, 2024
2 parents 4da565c + abecc5c commit f0498dc
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit f0498dc

Please sign in to comment.