Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- "**/Cargo.toml"
- ".github/workflows/publish.yml"

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -22,11 +25,11 @@ jobs:
with:
toolchain: stable
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
- name: Verify workspace packaging
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: cargo publish --dry-run --workspace --no-default-features --features rustls
- name: Publish workspace
run: |
cargo publish \
${{ startsWith(github.ref, 'refs/tags/v') && '--verbose' || '--dry-run' }} \
--workspace \
--token ${{ secrets.CRATES_TOKEN }} \
--no-default-features \
--features rustls
if: ${{ startsWith(github.ref, 'refs/tags/v') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
run: cargo publish --verbose --workspace --no-default-features --features rustls
Loading