name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install system dependencies (Linux)
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxtst-dev libevdev-dev libudev-dev pkg-config
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Publish to crates.io (dry-run)
shell: bash
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --dry-run
- name: Publish to crates.io
if: github.event_name == 'push'
shell: bash
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish