build: Change CI to just test and publish #11
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: Test & Publish | |
on: | |
workflow_dispatch: # enable manual triggering | |
push: | |
tags: | |
- 'v[0-9]+.*' | |
env: | |
BINARY_NAME: "domain-checker" | |
jobs: | |
test-and-publish: | |
name: Test and publish to crates.io | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features | |
- name: Publish to crates.io | |
run: cargo publish --token ${CRATES_TOKEN} | |
env: | |
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} |