Make the automatic tracing setup optional (#15)
#8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to Crates.io | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Run tests before publishing and only publish if tests pass | |
| call_tests: | |
| uses: ./.github/workflows/tests.yml | |
| publish: | |
| runs-on: ubuntu-latest | |
| # Try to publish only if the tests pass | |
| needs: call_tests | |
| if: success() | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Publish to Crates.io | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang curl pkg-config libssl-dev make | |
| make install-deps | |
| cargo publish --token $CARGO_REGISTRY_TOKEN | |
| continue-on-error: false |