name: Publish to crates.io on: push: tags: ["v*.*.*"] workflow_dispatch: inputs: tag: description: "Git tag to publish (e.g. v0.2.0). Defaults to latest tag." required: false type: string permissions: contents: read jobs: publish: name: Publish runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ inputs.tag || github.event.ref || github.ref }} fetch-depth: 0 - uses: dtolnay/rust-toolchain@stable # The workspace crates have no interdependencies, so publish order # doesn't matter for crates.io dependency resolution. A brief sleep # between publishes avoids hitting crates.io's rate limit. - name: Publish workspace crates run: | for crate in mytheclipse mytheclipse-cache mytheclipse-storage mytheclipse-event mytheclipse-config mytheclipse-crypto; do echo "Publishing $crate..." cargo publish -p "$crate" --allow-dirty --no-verify sleep 15 done env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}