name: Build, test, and publish to crates.io every tag (i.e. new version)
on:
push:
tags:
- "*"
jobs:
publish:
strategy:
matrix:
os:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --release --verbose
- run: cargo publish --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}