fixed -- in yml #2
This file contains 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: Main | |
on: | |
push: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-test: | |
name: Build and test (${{ matrix.os }}) | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup update stable && rustup default stable | |
- run: cargo build --verbose | |
- run: cargo test --verbose | |
publish: | |
name: Publish to crates.io | |
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish | |
- uses: actions/checkout@v4 | |
# https://doc.rust-lang.org/cargo/reference/config.html?highlight=CARGO_REGISTRY_TOKEN#credentials | |
- run: rustup update stable && rustup default stable | |
- run: > | |
cargo publish | |
--dry-run | |
--verbose | |
--locked | |
--token ${{ secrets.CARGO_REGISTRY_TOKEN }} |