added actions for publishing to crates.io

This commit is contained in:
2025-10-23 22:28:28 +02:00
committed by GitHub
parent 96d200888a
commit 0713ec0c80

27
.github/workflows/rust.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: |
cargo publish --verbose