Merge pull request #88 from xch-dev/better-cli #206
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "**" | |
| pull_request: | |
| branches: | |
| - "**" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install cargo-binstall | |
| run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
| - name: Run tests | |
| run: cargo test --all-features --workspace | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-features --all-targets | |
| - name: Unused dependencies | |
| run: | | |
| cargo binstall cargo-machete --locked | |
| cargo machete | |
| - name: Fmt | |
| run: cargo fmt --all -- --files-with-diff --check | |
| - name: Publish (dry run) | |
| run: | | |
| cargo binstall cargo-workspaces | |
| cargo ws publish --publish-as-is --allow-dirty --dry-run | |
| - name: Publish | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo ws publish --publish-as-is --allow-dirty |