Merge pull request #11 from codetiger/main #10
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: Release Crates | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install cargo-release | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: cargo-release | |
version: '^0.25' | |
- name: Configure git | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
- name: Run tests | |
run: cargo test | |
- name: Release and publish crates | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: cargo release patch --execute --no-confirm |